Moving picture coding method and moving picture decoding method

ABSTRACT

A moving picture coding apparatus ( 10   a ) according to the present invention includes a level analyzer ( 100   a ) that decides the maximum number of intra frame pixels which can be coded (Nfpx) and the maximum number of storage pixels which can be stored in a picture memory of a decoding apparatus (Nspx) on the basis of a level identifier (Lst) indicating a coding level that is designated by the user, thereby judging whether coding of an input image is possible or not and calculating the maximum number of reference pictures (Nrpn) as the number of reference candidate pictures which can be referred to at inter picture prediction coding, on the basis of the maximum number of intra frame pixels (Nfpx) and the input image size (the number of vertical pixels (Nhpx) and the number of horizontal pixels (Nwpx)). A decoding apparatus to which a bit stream from the moving picture coding apparatus ( 10   a ) is supplied can always decode the bit stream satisfactorily, and perform inter picture prediction decoding corresponding to the inter picture prediction coding on the coding end. Consequently, memory areas of a coding apparatus and a decoding apparatus that are adapted to a coding method in which there is no restraint on the capacity of the memory area can be designed.

This is a divisional application of Ser. No. 10/473,350, filed Sep. 30,2003, which is the National Stage of International Application No.PCT/JP03/00992, filed Jan. 31, 2003.

TECHNICAL FIELD

The present invention relates to a moving picture coding method and amoving picture decoding method and, more particularly, to a codingmethod for coding digital data of moving pictures which are to betransmitted or stored, and a decoding method corresponding to the codingmethod.

BACKGROUND ART

A moving picture consists of a plurality of pictures, and each pictureconsists of a predetermined number of pixels. Coding of a moving pictureis carried out for each picture, and coding of each picture is carriedout with taking a block which is obtained by partitioning the picture asa unit.

Generally, coding of a moving picture carries out compression ofinformation amount by eliminating redundancy in time direction and inspace direction.

For example, an inter picture prediction coding aiming at eliminatingtemporal redundancy carries out motion estimation and motioncompensation for the target picture which is to be coded in block unitswith referring to pictures which are located temporally forward orbackward of the target picture to generate prediction information, andthen codes the difference between the prediction information and thetarget picture information. A picture which is located temporallyforward of the target picture is a preceding picture, which is displayedearlier than the target picture, while a picture which is locatedtemporally backward of the target picture is a following picture, whichis displayed later than the target picture.

The H.264 coding system which is now being standardized as a movingpicture coding system carries out motion compensation with respect tothe target picture with referring to arbitrary two pictures which arelocated temporally forward and backward of the target picture. The H.264is numbered as a recommendation number by ITU-T (InternationalTelecommunication Union-Telecommunication Standardization Sector).

The coding aiming at eliminating spatial redundancy is carried out usingcoding information of the coded blocks which were already coded andwhich are positioned surrounding the target block.

However, when designing a coding apparatus and a decoding apparatusaccording to the H.264 system, there arises a problem that it is notpossible to appropriately decide the sizes of the memory areas which arerequired in these apparatus. This is caused by that the degree offreedom concerning the number of reference pictures which are referredat inter picture prediction coding is extremely high.

Generally, in the coding method for a moving picture which consists ofplural pictures, coding of a moving picture is carried out for eachpicture, and coding of each picture is carried out with taking a blockwhich is obtained by dividing the picture (hereinafter, referred to asmacroblock) as a unit.

For example, the coding of a picture P is carried out for eachmacroblock MB constituting the picture P, successively along an arrow Bas shown in FIG. 24(a). Further, coding of the macroblock MB12 as atarget block is carried out by predicting information such as motionvector, i.e., coding information, for the target macroblock withreferring to the coding information for macroblocks MB3, MB4, MB5, andMB12 which are located at above and at sides of the target macroblockMB12.

Therefore, it is necessary to hold the coding information of such as theabove macroblocks MB3 to MB11 which are located at above and at side ofthe target macroblock MB12 in order to perform prediction of codinginformation in coding macroblocks which are coded lately relative to themacroblock 12 until the coding process for the target macroblock MB12 iscompleted. In other words, in coding processing for each picture, codedinformation of macroblocks of approximately one row are always held.Therefore, in a case where the target image is an image that islaterally long, i.e., long in the horizontal direction, the codedinformation which is to be held in the coding processing becomes large.Accordingly, when designing an apparatus which can perform coding of animage that is laterally long, i.e., long in the horizontal direction, itis required to secure a large memory area for storing the codinginformation. Meanwhile, the coding information of macroblocks MB1 andMB2 shown in FIG. 24(b) are not referred to at coding of a macroblockwhose coding order follows the macroblock MB12.

It is needless to say that a larger storage area for storing the codinginformation, is required also when designing a decoding apparatus thatcan decode an image having a longer lateral side, similarly as whendesigning a coding apparatus.

In the H.264 coding system, however, no requirements are currentlyimposed on images for their pixel numbers in the horizontal and verticaldirection. This leads to a situation where the minimum size for astorage area that is required for appropriately performing coding ordecoding of an image according to the H.264 standard is not decided.

In addition, when inter picture prediction coding or decoding isperformed according to the H.264 standard, it is required to store allpreceding and following pictures which are likely to be referred to in apicture memory.

To be brief, in the conventional MPEG (Moving Picture Experts Group)-2or MPEG-4 method, pictures which can be referred to at the inter pictureprediction coding or inter picture prediction decoding, i.e., referencecandidate picture, are shared by all blocks of the target picture to becoded or decoded. For example, when the target picture is a B picturewhich can refer to two other processed pictures at maximum, pictureswhich are referred to at coding or decoding of each block, i.e.,reference pictures, are selected from two reference candidate picturesthat are decided for the target picture. When the target picture is a Ppicture which can refer to only one processed picture, only a referencepicture which is decided for the target picture, is used as a picturethat is referred to at coding or decoding of each block.

Descriptions of the reference pictures are given in a following part ofthe MPEG-4 Standard:

-   -   ISO/IEC 14496-2:1999(E)    -   Information technology—coding of audio-visual objects    -   Part 2: Visual    -   (1999-12-01)    -   pp. 328, 329 Annex N

On the other hand, in the H.264 coding method, a picture that isreferred to at the inter picture prediction coding or inter pictureprediction decoding, i.e., a reference picture, is selected from pluralprocessed pictures whose image data are stored in a picture memory, foreach block in a target picture to be coded or decoded. For example, in acase where the target picture is a B picture, for which each block iscoded or decoded with referring to two other processed pictures atmaximum, two pictures at maximum which are selected from pluralprocessed pictures image data of which are stored in a picture memory,are referred to at coding or decoding of each block as referencepictures. In a case where the target picture is a P picture, for whicheach block is coded or decoded with referring to only one processedpicture, a picture which is selected from plural processed picturesimage data of which are stored in the picture memory is employed as apicture to be referred to at coding or decoding of each block, as areference picture.

As discussed above, according to the MPEG-2 or MPEG-4 method, when thetarget picture is a P picture, one processed picture is a candidate forthe reference picture, i.e., a reference candidate picture, and when thetarget picture is a B picture, two processed pictures are referencecandidate pictures, while according to the H.264 method, both in caseswhere the target picture is a P picture and where the target picture isa B picture, plural processed pictures whose image data are stored inthe picture memory, serve as candidates for the reference picture, i.e.,reference candidate pictures.

FIG. 25 is a diagram for explaining a specific control of a picturememory according to the H.264 system. FIG. 25 shows a case where apicture memory can hold image data of four pictures. That is, in thiscase, three pictures among these four pictures, other than a targetpicture to be processed, are reference candidate pictures that may bereferred to.

For example, when inter picture prediction coding or inter pictureprediction decoding is carried out with taking picture P5 as a targetpicture to be processed as shown in FIG. 25, pictures P2 to P4 whoseimage data are stored in a picture memory Mpt are adopted as referencecandidate pictures. Here, pictures P1 to P5 are arranged in coding order(or decoding order), and these pictures are coded or decoded in theorder of arrangement. Thus, pictures which are displayed earlier thanthe target picture P5 among the reference candidate pictures P2 to P4,are preceding pictures for the target picture P5, and pictures which aredisplayed later than the target picture P5 among the reference candidatepictures P2 to P4, are following pictures for the target picture P5.

In a decoding apparatus, even when a previously decoded picture is adecoded picture that is other than reference candidate pictures whichare employed for referring in the inter picture prediction decoding forthe target picture, i.e., a decoded picture that is not employed as areference picture, image data of the decoded picture must be stored in apicture memory as a display waiting picture until the order of displaycomes.

FIG. 26 are diagrams schematically showing the display wait pictures.FIG. 26(a) shows plural pictures constituting a moving picture, whichare pictures that may be used as reference pictures (reference candidatepictures) [used], and pictures that would not be used as referencepictures [unused]. FIG. 26(b) shows the relationship between thedecoding timing and the display timing of each picture.

For the purpose of illustration, FIG. 26 show a case where referencepictures [used] which are used at coding or decoding of each block in Bpicture are both or either of two reference candidate pictures that arecommonly used for all blocks in this B picture, and reference pictures[used] which are used at the coding or decoding of each block in Ppicture are one reference candidate picture that is commonly used forall blocks in this P picture. However, in the H.264 method, a picture tobe referred to at picture coding or decoding, i.e., a reference picture,is selected from plural processed pictures whose image data are storedin picture memory, for each block of a target picture to be coded ordecoded. Therefore, the reference candidate pictures which are used atcoding or decoding of B picture are not restricted to two specificpictures for each B picture as shown in FIG. 26(a), and the referencecandidate picture that is used at coding or decoding of P picture is notrestricted to one specific picture for each P picture as shown in FIG.26(a).

In FIG. 26(a), reference candidate pictures for B picture B1 are an Ipicture I0 and B picture B2, and reference candidate pictures for Bpicture B2 are I picture I0 and P picture P4. Further, referencecandidate pictures for B picture B3 are B picture B2 and P picture P4,and a reference candidate picture for P picture P8 is P picture P4.

FIG. 26(b) shows that respective pictures shown in FIG. 26(a) aredecoded in the order of pictures 10, P4, B2, B1, B3, P8, B6, B5, B7, andthen displayed in the order of pictures I0, B1, B2, B3, P4, B5, B6, B7,P8.

In FIG. 26(b), Tdec shows the time axis for representing the decodingtimes of respective pictures, and Tdsp shows the time axis forrepresenting the display times of respective pictures. In addition,tdec(0), tdec(1), tdec(2), tdec(3), tdec(4), tdec(5), tdec(6), tdec(7),and tdec(8) denote the time periods in which decoding of pictures I0,B1, B2, B3, P4, B5, B6, B7, and P8 are carried out, respectively.Further, tdsp (0), tdsp(1), tdsp(2), tdsp(3), tdsp(4), tdsp(5), tdsp(6),tdsp(7), and tdsp(8) denote the time periods in which display ofpictures I0, B1, B2, B3, P4, B5, B6, B7, and P8 are carried out,respectively.

In this case, the decoding times of the pictures B2, B1, B3, P8, B6, B5and B7 roughly coincide with the display times of the pictures I0, B1,B2, B3, P4, B5, and B6, respectively, as shown in FIG. 26(b). Inaddition, the control of the picture memory is performed so that imagedata of decoded pictures are stored in the picture memory, and the imagedata of the pictures are deleted successively from pictures which havebeen displayed.

In this case, for example, I picture I0 is displayed after waiting forthe B picture B2 being decoded.

The image data of the reference candidate pictures are stored in thepicture memory, and these pictures are employed as reference picturesuntil these pictures are displayed later. However, image data ofpictures that are not referred to also must be kept until these picturesare displayed after being decoded. The image data of such decodedpictures that are not employed as reference pictures, are stored in apredetermined memory as display waiting pictures until these picturesare displayed.

In FIG. 26(a), B picture B1 that is decoded after I picture I0 beingdecoded, is a picture that is not used as a reference picture and willbe displayed subsequent to I picture I0, and therefore, it can bedisplayed immediately after the decoding thereof, while B picture B3that is decoded after B picture B1 being decoded, is a picture that willbe displayed after B picture B2 being displayed, that follows B pictureB1, and therefore, it will be displayed with waiting for a displayperiod of one picture, i.e., B picture B2, after B picture B1 beingdecoded.

In this case, the number of display waiting picture(s) at the decodingstart timing of P picture P8 is only one, i.e., B picture B3.

Further, there arises no problem by that the image data of pictureswhich will not be used as reference pictures should be deletedimmediately after the display of those pictures is completed. However,the timing of deleting the image data of these pictures may be otherthan immediately after the display of those pictures being performed.

In such cases, the image data of the pictures which are not used asreference pictures, would be kept stored in the memory also after thesepictures are displayed, and these pictures whose image data are held inthe picture memory are also handled as display waiting pictures.

For example, in a case where the control of the picture memory iscarried out such that image data of a picture which is stored in thepicture memory but is not used as a reference picture, is deleted fromthe picture memory after a display time of one picture expiring afterthe picture was displayed, the number of display waiting pictures at thestart of decoding of P picture P8 amounts to two, i.e., B picture B2 andB picture B3.

As discussed above, plural decoded or coded pictures are stored in apicture memory of a decoding apparatus or a coding apparatus, while inthe H.264 coding system there is currently no limitations on the maximumnumber of reference candidate pictures which are employed at the interpicture prediction coding or decoding, i.e., the maximum referencepicture number.

Thus, in the design of a coding apparatus or a decoding apparatusaccording to the H.264 system, the maximum number of decoded or codedpictures which are to be stored in the picture memory cannot beestablished, and therefore the capacity of a storage area to be mountedin the apparatus cannot be decided.

The present invention is made to solve the above-mentioned problems, andhas for its object to provide a moving picture coding method and amoving picture decoding method which can correctly judge thecapability/incapability of coding or decoding for a moving picture aswell as efficiently utilize a memory area mounted in a coding/decodingapparatus, and thereby enables designing a memory area in acoding/decoding apparatus according to a coding method which imposes nolimitations on the capacity of the memory.

DISCLOSURE OF THE INVENTION

According to the present invention (claim 1), there is provided a methodfor coding a moving picture which consists of a plurality of pictureseach consisting of a prescribed number of pixels, according to aselected coding level, including: a step of judging whether it ispossible to code the moving picture, on the basis of the maximum numberof intra frame pixels for a picture, which number conforms with theselected coding level; and a step of coding the moving picture that hasbeen judged encodable in the judging step, for each picture, to generatea code sequence for the moving picture, in which the code sequenceincludes a code of a level identifier that identifies the maximum numberof intra frame pixels for a picture that conforms with the selectedcoding level, and the maximum number of storage pixel numbercorresponding to the data amount that can be stored in a picture memory,which conforms with the selected coding level, and the vertical pixelnumber and the horizontal pixel number of a picture constituting themoving picture that has been judged encodable in the judgement stepsatisfy predetermined conditions dependent on the level identifier.

According to the present invention (claim 2), in the moving picturecoding method of claim 1, the coding step performs an inter pictureprediction coding to a target picture to be coded, using a coded pictureas a reference picture, where the maximum reference picture number thatis the maximum number of reference candidate pictures serving ascandidates for the reference picture, which pictures can be stored inthe picture memory, is calculated on the basis of the vertical pixelnumber and the horizontal pixel number of the target picture as well asthe level identifier.

According to the present invention (claim 3), in the moving picturecoding method of claim 1, the vertical pixel number (h) and thehorizontal pixel number (w) of a picture included in the moving picturethat has been judged encodable satisfy all following conditions, i.e.,(condition 1) to (condition 3):h×w<=(the maximum number of intra frame pixel number)  (condition 1)h<=round1(H)  (condition 2)w<=round2(W)  (condition 3)

where H denotes the maximum number among vertical pixel numbers in thepicture which can be coded, W denotes the maximum number amonghorizontal pixel numbers in the picture which can be coded, round1( )denotes a value that is obtained by an operation of rounding an argumentin parentheses to a multiple of the vertical pixel number in amacroblock which is a unit for coding a picture, and round2( ) denotes avalue that is obtained by an operation of rounding an argument inparentheses to a multiple of the horizontal pixel number in themacroblock.

According to the present invention (claim 4), in the moving picturecoding method of claim 3, round1( ) and round2( ) each denotes a valuewhich is obtained by an operation of rounding an argument in parenthesesto a multiple of 16.

According to the present invention (claim 5), in the moving picturecoding method of claim 2, the maximum reference picture number for thetarget picture is determined by a following formula:(the maximum reference picture number)=(the maximum storage pixelnumber)÷(h×w)−1

where h denotes the vertical pixel number in the target picture, wdenotes the horizontal pixel number in the target picture, and themaximum storage pixel number is the total number of the pixel numbers ofthe reference candidate pictures and of the target picture to bedecoded, which pictures are stored in a picture memory in the decodingapparatus.

According to the present invention (claim 6), in the moving picturecoding method of claim 2, the maximum reference picture number for thetarget picture is determined by a following formula:(the maximum reference picture number)=(the maximum storage pixelnumber)÷(h×w)−1−(the number of display waiting decoded pictures)

where h denotes the vertical pixel number in the target picture, wdenotes the horizontal pixel number in the target picture, and themaximum storage pixel number is the total number of the pixel numbersof, reference candidate pictures, the target picture to be decoded, anddisplay waiting decoded pictures, which pictures are stored in a picturememory of the decoding apparatus.

According to the present invention (claim 7), in the moving picturecoding method of claim 3, the maximum vertical pixel number and themaximum horizontal pixel number are calculated using following twoformulae:H=sqrt(h×w×N)W=sqrt(h×w×N),

where h denotes the vertical pixel number in the target picture, wdenotes the horizontal pixel number in the target picture, H denotes themaximum number among the vertical pixel numbers over pictures which canbe coded, W denotes the maximum number among the horizontal pixelnumbers over the pictures which can be coded, N denotes an arbitrarynatural number, and sqrt( ) denotes a positive square root of anargument in parentheses.

According to the present invention (claim 8), in the moving picturecoding method of claim 7, the natural number N is 8.

According to the present invention (claim 9), in the moving picturecoding method of claim 3, the maximum vertical pixel number and themaximum horizontal pixel number are calculated using following twoformulae:H=(the maximum intra frame pixel number)÷(vertical pixel numbercalculation coefficient)W=(the maximum intra frame pixel number)÷(horizontal pixel numbercalculation coefficient)

where H denotes the maximum vertical pixel number among pictures whichcan be coded, W denotes the maximum horizontal pixel number amongpictures which can be coded, and the vertical pixel number calculationcoefficient and the horizontal pixel number calculation coefficient arepredetermined values.

According to the present invention (claim 10), in the moving picturecoding method of claim 3, the maximum vertical pixel number and themaximum horizontal pixel number are decided with referring to apreviously defined table.

According to the present invention (claim 11), there is provided amethod for decoding a code sequence corresponding to a moving picturewhich consists of plural pictures each consisting of a prescribed numberof pixels, in accordance with a level identifier for identifying aselected coding level, which is extracted from the code sequence,including: a step of judging whether it is possible to decode the codesequence or not, on the basis of the maximum intra frame pixel numberfor a picture, which number is dependent on the coding level indicatedby the level identifier, and the maximum storage pixel number which isan amount of data which can be stored in a picture memory and isdependent on the coding level; and a step of decoding the code sequencethat has been judged decodable in the judgement step, for each picture,to generate image data for the moving picture, in which the verticalpixel number and the horizontal pixel number of a picture presented bythe code sequence that has been judged decodable in the judgement stepsatisfy predetermined conditions which are provided according to thelevel identifier.

According to the present invention (claim 12), in the moving picturedecoding method of claim 11, the judgment step performs judgment ofwhether it is possible to decode the target code sequence or not, on thebasis of the result of comparison between unique conditions provided inthe decoding apparatus, and the maximum intra frame pixel number and themaximum storage pixel number both corresponding to the coding levelindicated by the level identifier which is extracted from the codesequence.

According to the present invention (claim 13), in the moving picturedecoding method of claim 11, the decoding step subjects a target codesequence to an inter picture prediction decoding, using decoded picturesas reference pictures, and the maximum reference picture number which isthe maximum number of reference candidate pictures serving as acandidate for a reference picture, which can be stored in the picturememory, is calculated on the basis of the vertical pixel number and thehorizontal pixel number for the target picture as well as the levelidentifier.

According to the present invention (claim 14), in the moving picturedecoding method of claim 11, the vertical pixel number (h) and thehorizontal pixel number (w) of a picture corresponding to the bit streamthat has been judged decodable satisfy all following conditions, i.e.,(condition 4) to (condition 6):h<=round1(H)  (condition 4)w<=round2(W)  (condition 5)h×w<=(the maximum intra frame pixel number)  (condition 6)

where H denotes the maximum number among vertical pixel numbers ofpictures that can be decoded, W denotes the maximum number amonghorizontal pixel numbers of pictures that can be decoded, round1( )denotes a value that is obtained by an operation of rounding an argumentin parentheses to a multiple of the vertical pixel number in amacroblock serving as a unit for decoding a picture, and round2( )denotes a value that is obtained by an operation of rounding an argumentin parentheses to a multiple of the horizontal pixel number in theabove-described macroblock.

According to the present invention (claim 15), in the moving picturedecoding method of claim 14, round1( ) and round2( ) each denotes avalue which is obtained by an operation of rounding an argument inparentheses to a multiple of 16.

According to the present invention (claim 16), in the moving picturedecoding method of claim 12, the maximum reference picture number forthe target picture is determined by following formulae:(the maximum reference picture number)=(the maximum storage pixelnumber)÷(h×w)−1

where h denotes the vertical pixel number in the target picture to bedecoded, w denotes the horizontal pixel number in the target picture tobe decoded, and the maximum storage pixel number denotes the totalnumber of, the pixel numbers of the reference candidate pictures and thepixel number of the target picture to be decoded, these pictures beingstored in a picture memory of the decoding apparatus.

According to the present invention (claim 17), in the moving picturedecoding method of claim 12, the maximum reference picture number forthe target picture is determined by a following formula:(the maximum reference picture number)=(the maximum storage pixelnumber)÷(h×w)−1−(the number of display waiting decoded pictures)

where h denotes the vertical pixel number in the target picture to bedecoded, w denotes the horizontal pixel number in the target picture tobe decoded, and the maximum storage pixel number is the total number ofthe pixel numbers of, the reference candidate pictures, the targetpicture to be decoded, and display waiting decoded pictures, thesepictures being stored in a picture memory of the decoding apparatus.

According to the present invention (claim 18), in the moving picturedecoding method of claim 14, the maximum vertical pixel number and themaximum horizontal pixel number are calculated using following twoformulae:H=sqrt(h×w×N)W=sqrt(h×w×N),

where h denotes the vertical pixel number in the target picture, wdenotes the horizontal pixel number in the target picture, H denotes themaximum number among vertical pixel numbers of pictures which can bedecoded, W denotes the maximum number among horizontal pixel numbers ofpictures which can be decoded, N denotes an arbitrary natural number,sqrt( ) denotes a positive square root of an argument in parentheses.

According to the present invention (claim 19), in the moving picturedecoding method of claim 18, the natural number N is 8.

According to the present invention (claim 20), in the moving picturedecoding method of claim 14, the maximum vertical pixel number and themaximum horizontal pixel number are calculated using following twoformulae:H=(the maximum intra frame pixel number)÷(vertical pixel numbercalculation coefficient)W=(the maximum intra frame pixel number)÷(horizontal pixel numbercalculation coefficient)

where H denotes the maximum number among vertical pixel numbers inpictures which can be decoded, and W denotes the maximum number amonghorizontal pixel numbers in pictures which can be decoded.

According to the present invention (claim 21), in the moving picturedecoding method of claim 14, the maximum vertical pixel number and themaximum horizontal pixel number are decided with referring to apreviously defined table.

According to the present invention (claim 22), there is provided a datastorage medium that contains a program for implementing a process ofcoding a moving picture, where the program makes a computer execute thecoding process according to the moving picture coding method of any ofclaims 1 to 10.

According to the present invention (claim 23), there is provided a datastorage medium that contains a program for implementing a process ofdecoding a code sequence corresponding to a moving picture, where theprogram makes a computer execute the decoding process according to themoving picture decoding method of any of claims 11 to 21.

As described above, according to the present invention (claim 1), thereis provided a method for coding a moving picture which consists of aplurality of pictures each consisting of a prescribed number of pixels,according to a selected coding level, including: a step of judgingwhether it is possible to code the moving picture, on the basis of themaximum number of intra frame pixels for a picture, which numberconforms with the selected coding level; and a step of coding the movingpicture that has been judged encodable in the judging step, for eachpicture, to generate a code sequence for the moving picture, in whichthe code sequence includes a code of a level identifier that identifiesthe maximum number of intra frame pixels for a picture that conformswith the selected coding level, and the maximum number of storage pixelnumber corresponding to the data amount that can be stored in a picturememory, which conforms with the selected coding level, and the verticalpixel number and the horizontal pixel number of a picture constitutingthe moving picture that has been judged encodable in the judgement stepsatisfy predetermined conditions dependent on the level identifier.

Therefore, memory areas in a coding apparatus and a decoding apparatuswhich correspond to a coding method in which there is no limitations onthe capacity of the memory area can be designed.

In other words, according to the present invention, the maximum storagepixel number and the maximum intra frame pixel number can be set atoptimal values which are selected from plural values which are definedstepwise, in accordance with specifications for the apparatus, therebythe capability/incapability of coding or decoding for a target movingpicture as well as the maximum picture number that can be referred to atinter picture prediction coding, can be easily decided on the basis ofconditional formulas and tables with utilizing the selected maximumstorage pixel number and maximum intra frame pixel number. Thereby,indices associated with the design of the memory areas in the codingapparatus and the decoding apparatus are given, leading to an effectivehandling of the memory capacity with judging correctly thecapability/incapability of the coding or decoding which is to beexecuted to the target moving picture.

According to the present invention (claim 2), in the moving picturecoding method of claim 1, the coding step performs an inter pictureprediction coding to a target picture to be coded, using a coded pictureas a reference picture, where the maximum reference picture number thatis the maximum number of reference candidate pictures serving ascandidates for the reference picture, which pictures can be stored inthe picture memory, is calculated on the basis of the vertical pixelnumber and the horizontal pixel number of the target picture as well asthe level identifier. Therefore, the inter picture prediction coding canbe carried out with effectively utilizing a picture memory.

According to the present invention (claim 3), in the moving picturecoding method of claim 1, the vertical pixel number (h) and thehorizontal pixel number (w) of a picture included in the moving picturethat has been judged encodable satisfy all following conditions, i.e.,(condition 1) to (condition 3):h×w<=(the maximum number of intra frame pixel number)  (condition 1)h<=round1(H)  (condition 2)w<=round2(W)  (condition 3)

where H denotes the maximum number among vertical pixel numbers in thepicture which can be coded, W denotes the maximum number amonghorizontal pixel numbers in the picture which can be coded, round1( )denotes a value that is obtained by an operation of rounding an argumentin parentheses to a multiple of the vertical pixel number in amacroblock which is a unit for coding a picture, and round2( ) denotes avalue that is obtained by an operation of rounding an argument inparentheses to a multiple of the horizontal pixel number in themacroblock. Therefore, the capability or incapability of coding of amoving picture as an input image can be judged with reference to thenumbers of macroblocks in a picture as units of coding in the verticaland horizontal directions.

According to the present invention (claim 4), in the moving picturecoding method of claim 3, round1( ) and round2( ) each denotes a valuewhich is obtained by an operation of rounding an argument in parenthesesto a multiple of 16. Therefore, the capability or incapability of thecoding for a moving picture as an input image can be judged withreference to the numbers of macroblocks as units of coding in a picturein the vertical and horizontal directions, each macroblock beingcomposed of 16 pixels and 16 pixels.

According to the present invention (claim 5), in the moving picturecoding method of claim 2, the maximum reference picture number for thetarget picture is determined by a following formula:(the maximum reference picture number)=(the maximum storage pixelnumber)÷(h×w)−1

where h denotes the vertical pixel number in the target picture, wdenotes the horizontal pixel number in the target picture, and themaximum storage pixel number is the total number of the pixel numbers ofthe reference candidate pictures and of the target picture to bedecoded, which pictures are stored in a picture memory in the decodingapparatus. Therefore, an area for storing decoded data of a targetpicture can be always kept in the picture memory of the decodingapparatus.

According to the present invention (claim 6), in the moving picturecoding method of claim 2, the maximum reference picture number for thetarget picture is determined by a following formula:(the maximum reference picture number)=(the maximum storage pixelnumber)÷(h×w)−1−(the number of display waiting decoded pictures)

where h denotes the vertical pixel number in the target picture, wdenotes the horizontal pixel number in the target picture, and themaximum storage pixel number is the total number of the pixel numbersof, reference candidate pictures, the target picture to be decoded, anddisplay waiting decoded pictures, which pictures are stored in a picturememory of the decoding apparatus. Therefore, the number of referencecandidate pictures in a picture memory of a decoding apparatus can bechanged according to the number of display waiting decoded pictures.

According to the present invention (claim 7), in the moving picturecoding method of claim 3, the maximum vertical pixel number and themaximum horizontal pixel number are calculated using following twoformulae:H=sqrt(h×w×N)W=sqrt(h×w×N),

where h denotes the vertical pixel number in the target picture, wdenotes the horizontal pixel number in the target picture, H denotes themaximum number among the vertical pixel numbers over pictures which canbe coded, W denotes the maximum number among the horizontal pixelnumbers over the pictures which can be coded, N denotes an arbitrarynatural number, and sqrt( ) denotes a positive square root of anargument in parentheses. Therefore, the difference between the verticaldimension and the horizontal dimension of the input image can be keptwithin a predetermined range.

According to the present invention (claim 8), in the moving picturecoding method of claim 7, the natural number N is 8. Therefore, theratio between the vertical dimension and the horizontal dimension of theinput image can be kept within a range of 8:1 or smaller.

According to the present invention (claim 9), in the moving picturecoding method of claim 3, the maximum vertical pixel number and themaximum horizontal pixel number are calculated using following twoformulae:H=(the maximum intra frame pixel number)÷(vertical pixel numbercalculation coefficient)W=(the maximum intra frame pixel number)÷(horizontal pixel numbercalculation coefficient)

where H denotes the maximum vertical pixel number among pictures whichcan be coded, W denotes the maximum horizontal pixel number amongpictures which can be coded, and the vertical pixel number calculationcoefficient and the horizontal pixel number calculation coefficient arepredetermined values. Therefore, the maximum vertical pixel number andthe maximum horizontal pixel number can be calculated by simpleoperations.

According to the present invention (claim 10), in the moving picturecoding method of claim 3, the maximum vertical pixel number and themaximum horizontal pixel number are decided with referring to apreviously defined table. Therefore, the maximum vertical pixel numberand the maximum horizontal pixel number can be decided without employingan arithmetic operation.

According to the present invention (claim 11), there is provided amethod for decoding a code sequence corresponding to a moving picturewhich consists of plural pictures each consisting of a prescribed numberof pixels, in accordance with a level identifier for identifying aselected coding level, which is extracted from the code sequence,including: a step of judging whether it is possible to decode the codesequence or not, on the basis of the maximum intra frame pixel numberfor a picture, which number is dependent on the coding level indicatedby the level identifier, and the maximum storage pixel number which isan amount of data which can be stored in a picture memory and isdependent on the coding level; and a step of decoding the code sequencethat has been judged decodable in the judgement step, for each picture,to generate image data for the moving picture, in which the verticalpixel number and the horizontal pixel number of a picture presented bythe code sequence that has been judged decodable in the judgement stepsatisfy predetermined conditions which are provided according to thelevel identifier. Therefore, the capability or incapability of decodingin a decoding apparatus can be judged correctly, leading to an efficienthandling of the storage capacity.

In other words, according to the present invention, the maximum storagepixel number and the maximum intra frame pixel number can be set atoptimal values that are selected from plural values which are definedstepwise, in accordance with specifications of the apparatus, wherebythe capability/incapability of coding or decoding of a target movingpicture, and the maximum picture number that can be referred to at interpicture prediction coding can be decided on the basis of conditionalformulas and tables, using the selected maximum storage pixel number andselected maximum intra frame pixel number.

Further, because the code sequence includes, as header information, anidentifier of a coding level corresponding to the maximum storage pixelnumber and the maximum intra frame pixel number which have been selectedon the coding end, the decoding apparatus can immediately determine thecoding level on the basis of the identifier of the coding level.

According to the present invention (claim 12), in the moving picturedecoding method of claim 11, the judgment step performs judgment ofwhether it is possible to decode the target code sequence or not, on thebasis of the result of comparison between unique conditions provided inthe decoding apparatus, and the maximum intra frame pixel number and themaximum storage pixel number both corresponding to the coding levelindicated by the level identifier which is extracted from the codesequence. Therefore, it is possible to easily judge whether a codesequence that is inputted to a decoding apparatus can be decoded or notby the decoding apparatus.

According to the present invention (claim 13), in the moving picturedecoding method of claim 11, the decoding step subjects a target codesequence to an inter picture prediction decoding, using decoded picturesas reference pictures, and the maximum reference picture number which isthe maximum number of reference candidate pictures serving as acandidate for a reference picture, which can be stored in the picturememory, is calculated on the basis of the vertical pixel number and thehorizontal pixel number for the target picture as well as the levelidentifier. Therefore, the inter picture prediction decoding can beexecuted with effectively utilizing the picture memory.

According to the present invention (claim 14), in the moving picturedecoding method of claim 11, the vertical pixel number (h) and thehorizontal pixel number (w) of a picture corresponding to the bit streamthat has been judged decodable satisfy all following conditions, i.e.,(condition 4) to (condition 6):h<=round1(H)  (condition 4)w<=round2(W)  (condition 5)h×w<=(the maximum intra frame pixel number)  (condition 6)

where H denotes the maximum number among vertical pixel numbers ofpictures that can be decoded, W denotes the maximum number amonghorizontal pixel numbers of pictures that can be decoded, round1( )denotes a value that is obtained by an operation of rounding an argumentin parentheses to a multiple of the vertical pixel number in amacroblock serving as a unit for decoding a picture, and round2( )denotes a value that is obtained by an operation of rounding an argumentin parentheses to a multiple of the horizontal pixel number in theabove-described macroblock. Therefore, the capability or incapability ofdecoding for a moving picture as an input image can be judged withreference to the numbers of macroblocks as units of decoding in apicture in the vertical and horizontal directions.

According to the present invention (claim 15), in the moving picturedecoding method of claim 14, round1( ) and round2( ) each denotes avalue which is obtained by an operation of rounding an argument inparentheses to a multiple of 16. Therefore, the capability/incapabilityof decoding for a moving picture as an input image can be judged withreference to the numbers of macroblocks as units of decoding in apicture in the vertical and horizontal directions, each macroblock beingcomposed of 16 pixels×16 pixels.

According to the present invention (claim 16), in the moving picturedecoding method of claim 12, the maximum reference picture number forthe target picture is determined by following formulae:(the maximum reference picture number)=(the maximum storage pixelnumber)÷(h×w)−1

where h denotes the vertical pixel number in the target picture to bedecoded, w denotes the horizontal pixel number in the target picture tobe decoded, and the maximum storage pixel number denotes the totalnumber of, the pixel numbers of the reference candidate pictures and thepixel number of the target picture to be decoded, these pictures beingstored in a picture memory of the decoding apparatus. Therefore, an areafor storing decoded data of a target picture can be always kept in apicture memory of a decoding apparatus.

According to the present invention (claim 17), in the moving picturedecoding method of claim 12, the maximum reference picture number forthe target picture is determined by a following formula:(the maximum reference picture number)=(the maximum storage pixelnumber)÷(h×w)−1−(the number of display waiting decoded pictures)

where h denotes the vertical pixel number in the target picture to bedecoded, w denotes the horizontal pixel number in the target picture tobe decoded, and the maximum storage pixel number is the total number ofthe pixel numbers of, the reference candidate pictures, the targetpicture to be decoded, and display waiting decoded pictures, thesepictures being stored in a picture memory of the decoding apparatus.Therefore, the number of reference candidate pictures can be changedaccording to the number of display waiting decoded pictures in a picturememory of a decoding apparatus.

According to the present invention (claim 18), in the moving picturedecoding method of claim 14, the maximum vertical pixel number and themaximum horizontal pixel number are calculated using following twoformulae:H=sqrt(h×w×N)W=sqrt(h×w×N)

where h denotes the vertical pixel number in the target picture, wdenotes the horizontal pixel number in the target picture, H denotes themaximum number among vertical pixel numbers of pictures which can bedecoded, W denotes the maximum number among horizontal pixel numbers ofpictures which can be decoded, N denotes an arbitrary natural number,sqrt( ) denotes a positive square root of an argument in parentheses.Therefore, a difference between the vertical dimension and thehorizontal dimension of an input image can be kept within apredetermined range.

According to the present invention (claim 19), in the moving picturedecoding method of claim 18, the natural number N is 8. Therefore, theratio between the vertical dimension and the horizontal dimension of aninput image can be kept within a range of 8:1 or smaller.

According to the present invention (claim 20), in the moving picturedecoding method of claim 14, the maximum vertical pixel number and themaximum horizontal pixel number are calculated using following twoformulae:H=(the maximum intra frame pixel number)÷(vertical pixel numbercalculation coefficient)W=(the maximum intra frame pixel number)÷(horizontal pixel numbercalculation coefficient)

where H denotes the maximum number among vertical pixel numbers inpictures which can be decoded, and W denotes the maximum number amonghorizontal pixel numbers in pictures which can be decoded. Therefore,the maximum vertical pixel number and the maximum horizontal pixelnumber can be calculated by simple operations.

According to the present invention (claim 21), in the moving picturedecoding method of claim 14, the maximum vertical pixel number and themaximum horizontal pixel number are decided with referring to apreviously defined table. Therefore, the maximum vertical pixel numberand the maximum horizontal pixel number can be decided without employingarithmetic operations.

According to the present invention (claim 22), there is provided a datastorage medium that contains a program for implementing a process ofcoding a moving picture, where the program makes a computer execute thecoding process according to the moving picture coding method of any ofclaims 1 to 10. Therefore, by loading a program for implementing acoding process for a moving picture on a computer, it is possible toperform the handling of a memory area in a coding apparatus efficiently,thereby facilitating the design of the apparatus.

According to the present invention (claim 23), there is provided a datastorage medium that contains a program for implementing a process ofdecoding a code sequence corresponding to a moving picture, where theprogram makes a computer execute the decoding process according to themoving picture decoding method of any of claims 11 to 21. Therefore, byloading a program for implementing a process for decoding a movingpicture on a computer, it is possible to perform the handling of amemory area in a decoding apparatus efficiently, thereby facilitatingthe design of the apparatus.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram for explaining a moving picture codingapparatus 10 a according to a first embodiment of the present invention.

FIG. 2 is a block diagram illustrating a specific construction of acoding capability judgment unit 108 a in the moving picture codingapparatus 10 a according to the first embodiment.

FIG. 3 is a block diagram illustrating a specific construction of amaximum reference picture number calculation unit 109 a in the movingpicture coding apparatus 10 a according to the first embodiment.

FIG. 4 is a block diagram for explaining a moving picture codingapparatus 10 b according to a second embodiment of the presentinvention.

FIG. 5 is a block diagram illustrating a specific construction of acoding capability judgment unit 108 b in the moving picture codingapparatus 10 b according to the second embodiment.

FIG. 6 is a block diagram for explaining a moving picture codingapparatus 10 c according to a third embodiment of the present invention.

FIG. 7 is a block diagram illustrating a specific construction of acoding capability judgment unit 108 c in the moving picture codingapparatus 10 c according to the third embodiment.

FIG. 8 is a block diagram for explaining a moving picture codingapparatus 10 d according to a fourth embodiment of the presentinvention.

FIG. 9 is a block diagram illustrating a specific construction of amaximum reference picture number calculation unit 109 d in the movingpicture coding apparatus 10 d according to the fourth embodiment.

FIG. 10 is a block diagram for explaining a moving picture decodingapparatus 50 a according to a fifth embodiment of the present invention.

FIG. 11 is a block diagram for explaining a moving picture decodingapparatus 50 b according to a sixth embodiment of the present invention.

FIG. 12 is a block diagram for explaining a moving picture decodingapparatus 50 c according to a seventh embodiment of the presentinvention.

FIG. 13 is a block diagram for explaining a moving picture decodingapparatus 50 d according to an eighth embodiment of the presentinvention.

FIG. 14 are diagram for explaining data structures of bit streams whichare generated by the moving picture coding apparatus according to theabove embodiments; FIGS. 14(a), 14(b), and 14(c) showing bit streamsBsa, Bsb, and Bsc, which are generated by the moving picture codingapparatuses 10 a, 10 b, and 10 c according to the first, second, andthird embodiments, respectively.

FIG. 15 is a diagram showing a table T1 that defines correspondencebetween the level identifier and a pair of the maximum intra frame pixelnumber and the maximum storage pixel number, which is employed in themoving picture coding apparatus 10 a according to the first embodiment.

FIG. 16 are diagram showing tables which are employed in the movingpicture coding apparatus 10 a according to the first embodiment; FIG.16(a) showing a table T1 a that defines correspondence between the levelidentifier and the maximum intra frame pixel number, and FIG. 16(b)showing a table T1 b that defines correspondence between the levelidentifier and the maximum storage pixel number.

FIG. 17 are diagram showing tables which are employed in the secondembodiment; FIG. 17(a) showing a table T2 that defines correspondencebetween the identification number and a pair of the horizontal pixelnumber calculation coefficient and the vertical pixel number calculationcoefficient, FIG. 17(b) showing a table T2 a that defines correspondencebetween the identification number and the horizontal pixel numbercalculation coefficient, and FIG. 17(c) showing a table T2 b thatdefines correspondence between the identification number and thevertical pixel number calculation coefficient.

FIG. 18 are diagram showing tables which are employed in the thirdembodiment, FIG. 18(a) showing a table T3 that defines correspondencebetween the identification number and a pair of the maximum verticalpixel number and the maximum horizontal pixel number, FIG. 18(b) showinga table T3 a that defines correspondence between the identificationnumber and the maximum horizontal pixel number, and FIG. 18(c) showing atable T3 b that defines correspondence between the identification numberand the maximum vertical pixel number.

FIG. 19 are diagrams explaining a data storage medium that contains aprogram for implementing the moving picture coding apparatus or themoving picture decoding apparatus according to any of the aboveembodiments by a computer system (FIGS. 19(a) and 19(b)), and thecomputer system (FIG. 19(c)).

FIG. 20 is a diagram for explaining an application of the moving picturecoding apparatus and the moving picture decoding apparatus according toany of the above embodiments, and shows a contents supply system 1100for providing contents distribution services.

FIG. 21 is a diagram for explaining a portable phone 1200 that utilizesthe moving picture coding apparatus and the moving picture decodingapparatus according to any of the above embodiments.

FIG. 22 is a block diagram illustrating a specific construction of theportable phone 1200 as shown in FIG. 21.

FIG. 23 is a conceptual drawing showing a digital broadcasting system1400 that utilizes the moving picture coding apparatus or the movingpicture decoding apparatus according to any of the above embodiments.

FIG. 24 are diagram for explaining a conventional coding method, andFIG. 24(a) showing the order of coding for macroblocks in a targetpicture to be coded, and FIG. 24(b) showing surrounding macroblockswhich are referred to at the coding of a target macroblock to be coded.

FIG. 25 is a diagram for explaining conventional coding method anddecoding method, and shows other pictures whose image data are stored ina picture memory at the coding (or decoding) of a target picture.

FIG. 26 are diagrams schematically showing the control for display waitpictures in the conventional coding method and decoding method, FIG.26(a) showing pictures which are referred to ([used]) and pictures whichare not referred to ([unused]), and FIG. 26(b) showing the relationshipbetween the decoding timing and the coding timing of each picture.

BEST MODE FOR CARRYING OUT THE INVENTION

Hereinafter, embodiments of the present invention will be described.

Embodiment 1

FIG. 1 is a block diagram explaining a moving picture coding apparatus10 a according to a first embodiment of the present invention.

The moving picture coding apparatus 10 a according to the firstembodiment divides plural pictures that constitute a moving picture,into predetermined data processing units, i.e., blocks, respectively,and encodes image data of each picture for each block. It is assumedhere that the block is a macroblock which is composed of 16 verticalpixels×16 horizontal pixels.

More specifically, this moving picture coding apparatus 10 a includes apicture memory 101 that stores input data Id of a input moving picturewhich is inputted picture by picture, and outputs stored data SId blockby block; a difference calculator 113 that calculates a differencebetween the image data SId of a target block to be coded, which isoutputted from the picture memory 101 and predictive data Pd of thetarget block, and outputs prediction residual data Dd of the targetblock; and a prediction residual encoder 102 that compressively encodesthe image data SId or prediction residual data Dd of the target block.Here, in the picture memory 101, a process for reordering image data ofpictures which are inputted in the display order, to be arranged in thepicture coding order is carried out on the basis of the relationshipbetween the target picture and a picture to be referred to, i.e.,reference picture at the prediction coding. The picture memory 101outputs information indicating the size of an input image, i.e., inputimage size information Ipx, and this input image size information Ipx iscomposed of vertical pixel number information Ihpx indicating the number(h) of vertical pixels in the input image and horizontal pixel numberinformation Iwpx indicating the number (w) of horizontal pixels in theinput image.

The moving picture coding apparatus 10 a includes a prediction residualdecoder 104 that decompressively decodes output coded data Cd from theprediction residual encoder 102, and outputs differential data of thetarget block (hereinafter, referred to as decoded differential data)PDd; an adder 114 that adds the decoded differential data PDd of thetarget data and the predictive data Pd of the target block, and outputsimage data of the target block (hereinafter, referred to as decodeddata) Rd; and a picture memory 105 that stores the decoded data Rd andoutputs the stored decoded data Rd as data CRd of a candidate forpicture to be referred to at the coding of the target block, i.e.,reference candidate picture, in accordance with a picture designationsignal CSpd.

The moving picture coding apparatus 10 a includes a motion estimationunit 106 that estimates a motion vector MV for the target block on thebasis of the output data, i.e., image data of the target block SId fromthe picture memory 101 and the output data, i.e., data of a referencecandidate picture CRd from the picture memory 105, and generatespredictive data Pd for the target block on the basis of the estimatedmotion vector MV; and a motion vector storage unit 107 that stores themotion vector MV for the target block, which has been estimated by themotion vector estimation unit 106. The motion estimation unit 106performs the motion estimation for estimating a motion vector for targetblock, with referring to an optimal picture among plural referencecandidate pictures as well as referring to motion vectors for processedblocks that are located around the target block. Here, the optimalpicture among the plural reference candidate pictures is decided on thebasis of the coding efficiency or the like.

The moving picture coding apparatus 10 a includes a selector switch 111that selects one of the output data SId from the picture memory 101 andthe output data Dd from the difference calculator 113 and outputsselected data CEd, and an ON/OFF switch 112 that is provided between themotion vector estimation unit 106 and the adder 114. Here, the selectorswitch 111 has two input terminals Ta1 and Ta2 and one output terminalTb, and the output terminal Tb is connected to one of the two inputterminals Ta1 and Ta2 in accordance with a switch control signal.

The moving picture coding apparatus 10 a according to the firstembodiment includes a level analyzer 10 a that outputs informationindicating the maximum intra frame pixel number that can be coded (Nfpx)(hereinafter, referred to as maximum intra frame pixel numberinformation) Ifpx and information indicating the maximum storage pixelnumber which can be stored in a picture memory of a decoding apparatus(Nspx) (hereinafter, referred to as maximum storage pixel numberinformation) Ispx, on the basis of a level identifier signal indicatinga coding level, i.e., level signal Lst, which is inputted by a useroperation. This level analyzer 100 a has information of a table T1 asshown in FIG. 15. The table T1 shows correspondence between values ofthe level identifier, and the maximum intra frame pixel numbers and themaximum storage pixel numbers.

The moving picture coding apparatus 10 a includes a judgement unit,i.e., coding capability judgment unit 108 a that judges whether codingof an input image is possible or not on the basis of the maximum intraframe pixel number information Ifpx from the level analyzer 100 a andinput picture size information Ipx from the picture memory 101, andoutputs a signal indicating the judgment result, i.e., judgment resultsignal CSjd. The moving picture coding apparatus 10 a includes acalculator, i.e., maximum reference picture number calculator 109 a thatcalculates the number of reference candidate pictures, i.e., maximumreference picture number Nrpn which can be referred to at the interpicture prediction coding on the basis of the maximum storage pixelnumber information Ispx and the input image size information Ipx, andoutputs information, i.e., maximum reference picture number informationIrpn indicating the calculated number Nrpn.

The moving picture coding apparatus 10 a further includes a bit streamgenerator 103 that variable-length-codes the output coded data Cd fromthe prediction residual encoder 102, then adds codes corresponding tothe motion vector MV, a mode signal Ms, and the level signal Lst to abit stream obtained by the variable length coding, and outputs anobtained bit stream Bsa.

The moving picture coding apparatus 10 a further includes a control unit110 that controls operations of the respective components of the movingpicture coding apparatus 10 a, in accordance with control signals Sct1,Sct2, . . . , Sctn, on the basis of the judgement result signal CSjd andthe image data SId from the picture memory 101. The control unit 110decides a coding mode according to the image data SId from the picturememory 101, and outputs a mode signal Ms indicating the decided mode, aswell as controls the switches 111 and 112 according to the decidedcoding mode, by predetermined signals. The control unit 110 furthercontrols operations of the prediction residual encoder 102, theprediction residual decoder 104, the bit stream generator 103, themotion vector estimation unit 106, and the like, in accordance with thecontrol signals Sct1, Sct2, . . . , Sctn, according to the judgmentresult signal CSjd. That is, the control unit 110 controls theprediction residual encoder 102, the prediction residual decoder 104,the bit stream generator 103, the motion vector estimation unit 106, andthe like, for performing coding of an input image when the judgmentresult signal CSjd indicates that it is possible to encode the inputimage, while controls the prediction residual encoder 102, theprediction residual decoder 104, the bit stream generator 103, themotion vector estimation unit 106, and the like, for not performingcoding of an input image when the judgment result signal CSjd indicatesthat it is impossible to encode the input image.

FIG. 14(a) shows a data structure of a bit stream Bsa corresponding toan input image.

The bit stream Bsa is composed of a header area Ha that contains variousheader information, and a sequence data part Dsq that contains codeddata, i.e., a bit stream corresponding to image data of each picture.

A code H1 corresponding to the level identifier signal, i.e., levelsignal Lst is included in the header area Ha of the bit stream Bsa, asone kind of the header information. Further, a sequence header Shindicating the size of an input image, i.e., the number of verticalpixels in the input image (hereinafter, referred to as input imagevertical pixel number) (h) and the number of horizontal pixels in theinput image (hereinafter, referred to as input image horizontal pixelnumber) (w) is included in the sequence data part Dsp of the bit streamBsa.

FIG. 2 is a diagram illustrating a specific construction of the codingcapability judgment unit 108 a.

The coding capability judgment unit 108 a includes a multiplier 206 thatcalculates the product (Phw) of the input image vertical pixel number(h) and the input image horizontal pixel number (w) on the basis of theinput pixel vertical pixel number information Ihpx and the input pixelhorizontal pixel number information Iwpx, and outputs a multiplicationsignal Shw indicating the result of the multiplication; and a firstcomparator 203 that compares the product (Phw) and the maximum intraframe pixel number Nfpx on the basis of the multiplication signal Shwand the maximum intra frame pixel number information Ifpx, and outputs afirst comparison result signal Scm1 indicating the result of comparison.

The coding capability judgment unit 108 a includes a calculator, i.e.,maximum vertical pixel number/maximum horizontal pixel number calculator201 that calculates the maximum vertical pixel number (H) and themaximum horizontal pixel number (w) which can be processed, on the basisof the input image vertical pixel number information Ihpx and the inputimage horizontal pixel number information Iwpx, and outputs informationOp3 a and Op3 b indicating the operation results; and a 16-multipleconverter 202 that performs a rounding operation for rounding themaximum vertical pixel number (H) and the maximum horizontal pixelnumber (w) to multiples of 16 on the basis of the operation resultinformation Op3 a and Op3 b from the calculator 201, and outputsrounding information Trnd1 indicating a multiple of 16 to which themaximum vertical pixel number (H) is rounded (round1(H)) and roundinginformation Trnd2 indicating a multiple of 16 to which the maximumhorizontal pixel number (W) is rounded (round2(H)).

The coding capability judgment unit 108 a includes a second comparator204 that performs comparison between the input image vertical pixelnumber (h) and the maximum vertical pixel number (H) (vertical pixelnumber comparison) and comparison between the input image horizontalpixel number (w) and the maximum horizontal pixel number (W) (horizontalpixel number comparison) on the basis of the pixel number informationIhpx and Iwpx, and the rounding information Trnd1 and Trnd2, and outputsa comparison result signal Scm2 a indicating the result of the verticalpixel number comparison, and a comparison result signal Scm2 bindicating the result of the horizontal pixel number comparison; and anAND unit 205 that takes an AND operation of the three comparison resultsignals Scm1, Scm2 a and Scm2 b, and outputs the operation result signalCSjd indicating the result of AND operation.

FIG. 3 is a diagram illustrating a specific construction of the maximumreference picture number calculator 109 a.

The maximum reference picture number calculator 109 a includes amultiplier 401 that calculates the total number of pixels in one frame(Phw=h×w) corresponding to the size of the input image on the basis ofthe input image vertical pixel number information Ihpx and the inputimage horizontal pixel number information Iwpx, and outputs an operationoutput Ohw indicating the result of calculation; and a divider 402 thatdivides the maximum storage pixel number (Nspx) by the total pixelnumber in one frame (h×w) on the basis of the operation output Ohw andthe maximum storage pixel number information Ispx, and outputs anoperation output signal Dpm indicating the result of division(Nspx/(h×w)). The maximum reference picture number calculator 109 afurther includes a constant storage unit 404 that retains a numericvalue signal Sn1 indicating the number of pictures to be coded, i.e.,one picture, and outputs the numeric value signal Sn1; and a subtractor403 that outputs a subtraction output signal Sd1 indicating a valueobtained by subtracting 1 from the division result (Nspx/(h×w) i.e.,Nspx/(h×w)−1.

Next, the operation will be described hereinafter.

In the moving picture coding apparatus 10 a according to the firstembodiment, before performing a coding of an input image, a levelrequired is selected from a plurality of coding levels which arepreviously established and are employed as coding conditions, on thebasis of the construction of a memory or the like in the moving picturecoding apparatus 10 a, and the construction of a memory or the like in amoving picture decoding apparatus to which coded data are supplied. Morespecifically, the coding level selection is performed by the user withreferring to the table T1, and the level signal Lst indicating the levelidentifier corresponding to the selected level is inputted to the movingpicture coding apparatus 10 a by the user operation.

In this case, a specific maximum intra frame pixel number (Nfpx) andmaximum storage pixel number (Nspx) are set for each coding level. Thetable T1 in FIG. 15 shows eight coding levels, which correspond tovalues (1) to (8) of the level identifier, respectively. Further, thevalues (1) to (8) of the level identifier are correlated with specificvalues of the maximum intra frame pixel number (Nfpx) and specificvalues of the maximum storage pixel number (Nspx), respectively.

The maximum intra frame pixel number (Nfpx) indicates the size of apicture constituting an input image, i.e., input moving picture, whichcan be coded by the moving picture coding apparatus 10 a and can decodedby a moving picture decoding apparatus to which the coded data aresupplied, and this is the maximum value possibly taken by the product ofthe number of vertical pixels (h) and the number of horizontal pixels(w) in the picture. More specifically, the maximum intra frame pixelnumber indicates the maximum value of the number of pixels per picture.

The maximum storage pixel number (Nspx) indicates the number of pixelscorresponding to the amount of image data which can be stored in apicture memory in a decoding apparatus associated with the movingpicture coding apparatus 10 a. In other words, the maximum storage pixelnumber (Nspx) is the number of pixels equivalent to the maximum amountof image data which can be stored in the picture memory. For example,data of pictures such as reference candidate pictures, decoded picturesthat wait for being displayed, and a picture to be decoded are stored inthe picture memory of the moving picture decoding apparatus that decodesa bit stream from the moving picture coding apparatus 10, and themaximum storage pixel number is equal to the total number of the pixelsin these pictures.

In this moving picture coding apparatus 10 a, when the selection of thecoding level is performed by the user operation, the level selectionsignal Lst is inputted to the level analyzer 10 a. Then, the levelanalyzer 10 a refers to the table T1 (see FIG. 15) held therein, andoutputs the maximum intra frame pixel number information Ifpx and themaximum storage pixel number information Ispx adaptively to the codinglevel indicated by the level signal Lst, which is selected by the user.The maximum intra frame pixel number information Ifpx is inputted to thecoding capability judgment unit 108 a, and the maximum storage pixelnumber information Ispx is inputted to the maximum reference picturenumber calculator 109 a.

When image data Id of a moving picture, i.e., input image is inputted tothe picture memory 101 in picture units in the order of display time,image data corresponding to each picture is successively stored in thepicture memory 101, and the stored image data SId is outputted from thepicture memory 101 in units of blocks, i.e., macroblocks that constitutethe picture, in the order of coding. At this time, the informationindicating the size of the input image, i.e., input image sizeinformation Ipx is outputted from the picture memory 101 to the codingcapability judgment unit 108 a and the maximum reference picture numbercalculator 109 a.

Here, for example, the macroblock is a block in which the number ofhorizontal pixels (hereinafter, referred to as horizontal pixel number)is 16, and the number of vertical pixels (hereinafter, referred to asvertical pixel number) is 16 (16×16 pixel block). Then, the codingprocess in the moving picture coding apparatus is performed in units ofblocks. Further, as described above, the input image size informationIpx is composed of the information Ihpx indicating the number ofvertical pixels (h) in the input image and the information Iwpxindicating the number of horizontal pixels (w) in the input image.

Then, the coding capability judgment unit 108 a judges whether the inputimage is encodable on the basis of the vertical pixel number informationIhpx and the horizontal pixel number information Iwpx of the input imageincluded in the input image size information Ipx, which is outputtedfrom the picture memory 101, and the maximum intra frame pixel numberinformation Ifpx outputted from the level analyzer 10 a, and outputs asignal indicating the judgment result, i.e., judgment result signal CSjdto the control unit 110.

The control unit 110 controls the respective units in the moving picturecoding apparatus 10 a for performing coding of the image data SId fromthe picture memory 101 in accordance with control signals Sct1, Sct2, .. . , Sctn, when the judgment result signal CSjd indicates that theinput image is encodable, while controlling the respective units in themoving picture coding apparatus 10 a for not performing coding of theimage data SId from the picture memory 101 in accordance with thecontrol signals Sct1, Sct2, . . . , Sctn, when the judgement resultsignal CSjd indicates that it is impossible to code the input image.

Further, the control unit 110 switches between a mode for performinginter picture prediction coding for image data and a mode for performingintra picture prediction coding for image data, on the basis of theimage data SId from the picture memory 101, when the judgment resultsignal CSjd indicates that the input image is encodable. When thecontrol unit 110 selects the mode for performing the inter pictureprediction coding of image data, it controls the switch 111 so that theoutput terminal Tb is connected to the second input terminal Ta2, andcontrols the switch 112 so as to be brought into conduction, by apredetermined control signal. On the other hand, when the control unit110 selects a mode for performing intra picture prediction coding ofimage data, the control unit 110 controls the switch 111 so that theoutput terminal Tb is connected to the first input terminal Ta1, andcontrols the switch 112 so as to be brought out of conduction, by apredetermined control signal.

The maximum reference picture number calculator 109 a calculates thenumber of reference candidate pictures which can be referred to at theinter picture prediction coding (hereinafter, referred to as a maximumreference picture number) (Nrpn), on the basis of the maximum storagepixel number information Ispx, the input image vertical pixel numberinformation Ihpx, and the input image horizontal pixel numberinformation Iwpx, and outputs information indicating the calculatednumber (Nrpn), i.e., reference picture maximum number information Irpn.

Hereinafter, the operation in a case where the inter picture predictioncoding is selected will be described.

The image data SId of a macroblock, which has been read from the picturememory 101 is input to the motion vector estimation unit 106. At thistime, decoded image data Rd corresponding to coded pictures are storedin the picture memory 105 as image data of reference candidate pictures,and a required picture among the reference candidate pictures in thepicture memory 105 is designated as a reference picture by the picturedesignation signal CSpd from the motion vector estimation unit 106. Themotion vector estimation unit 106 employs image data of the designatedreference candidate picture as image data CRd of the reference picture,to perform a process for estimating a motion vector MV for the targetmacroblock to be coded. Image data of a reference image corresponding tothe target macroblock, which is decided by the obtained motion vector MVis inputted to the difference calculator 113 as predictive data Pd forthe target macroblock.

The difference calculator 113 calculates a difference between the imagedata SId of the target macroblock and the predictive data Pd to generateprediction residual image data Dd, and then the prediction residualencoder 102 encodes the prediction residual image data Dd and outputsprediction residual coded data Cd.

Then, the prediction residual decoder 104 decodes the predictionresidual coded data Cd, and outputs prediction residual image data PDdobtained by the decoding, to the adder 114. The adder 114 adds theprediction residual image data PDd from the prediction residual decoder104 and the predictive data Pd from the motion vector estimation unit106, and then the image data Rd obtained by the addition is stored inthe picture memory 105.

The bit stream generator 103 generates a bit stream corresponding to theprediction residual coded data Cd that is outputted from the predictionresidual encoder 102, and outputs the generated bit stream together witha code corresponding to the motion vector MV from the motion vectorestimation unit 106, a code corresponding to a mode signal Ms from thecontrol unit 110, and a code corresponding to the level signal Lst, as abit stream Bsa. As shown in FIG. 14(a), the code H1 corresponding to thelevel signal Lst is included in the header area Ha of the bit streamBsa, and the image information that is generated by the coding in unitsof macroblocks, the code corresponding to the motion vector, and thecode corresponding to the mode signal are included in the sequence datapart Dsp, together with the sequence header Sh. The sequence header Shincludes a code corresponding to the information Ipx that indicates thenumber of vertical pixels (h) and the number of horizontal pixels (2) ofthe input image.

Next, the operation in a case where intra picture prediction coding isselected will be briefly described.

In this case, the image data SId outputted from the picture memory 101is inputted to the prediction residual encoder 102 through the switch111, and then encoded by the encoder 102 to be inputted to the bitstream generator 103.

The bit stream generator 103 generates a bit stream corresponding to thecoded data Cd outputted from the encoder 102, and outputs the generatedbit stream together with the code corresponding to the mode signal Msfrom the control unit 110 and the code corresponding to the level signalLst, as a bit stream Bsa (see FIG. 14(a)).

The prediction residual decoder 104 decodes the coded data Cd outputtedfrom the prediction residual encoder 102, and stores the predictionresidual image data PDd obtained by the decoding in the picture memory105 through the adder 114 as it is, as the image data Rd.

Next, a specific operation of the coding capability judgment unit 108 ain the moving picture coding apparatus 10 a will be described withreference to FIG. 2.

The coding capability judgment unit 108 a in the moving picture codingapparatus 10 a according to the first embodiment judges the capabilityof coding for an input image in accordance with following conditionalformulae: (formula 1), (formula 2a), (formula 2b), (formula 3a), and(formula 3b). The conditional formulae: (formula 1), (formula 2a), and(formula 2b) are defined by claim 3, and the conditional formulae:(formula 3a) and (formula 3b) are defined by claim 7.h×w<=Nfpx  (formula 1)h<=round1(H)  (formula 2a)w<=round2(W)  (formula 2b)H=sqrt(h×w×N)  (formula 3a)W=sqrt(h×w×N)  (formula 3b)

Here, Nfpx designates the maximum intra frame pixel number, h designatesthe number of vertical pixels in a target picture to be coded, wdesignates the number of horizontal pixels in the target picture, Hdesignates the maximum number of vertical pixels of an input image,which can be coded by the moving picture coding apparatus 10 a, Wdesignates the maximum number of horizontal pixels of an input image,which can be coded by the moving picture coding apparatus 10 a, and Ndesignates an arbitrary natural number. Further, round1( ) is a signthat designates the result of an operation for rounding the value of anargument in parentheses to a multiple of the vertical pixel number in amacroblock, i.e., the unit of coding, round2( ) is a sign thatdesignates the result of an operation for rounding the value of anargument in parentheses to a multiple of the horizontal pixel number inthe macroblock, i.e., the unit of coding, sqrt( ) is a sign thatdesignates the square root of an argument in parentheses.

Initially, the coding capability judgment unit 108 a performs theoperation indicated by (formula 1) on the basis of the vertical pixelnumber information Ihpx and the horizontal pixel number information Iwpsof the input image included in the input image size information Ipx thatis outputted from the picture memory 101. More specifically,multiplication for obtaining the product (h×w) of the vertical pixelnumber (h) and the horizontal pixel number (w) in the input image iscarried out by the multiplier 206, and further comparison between themultiplication result (h×w) and the maximum intra frame pixel number(Nfpx) is performed by the first comparator 203 on the basis of a signalShw indicating the result of the multiplication and the maximum intraframe pixel number information Ifpx. The comparison result signal Scm1indicating the result of the comparison is outputted from the firstcomparator 203 to the AND unit 205.

Next, in the coding capability judgment unit 108 a, the maximum verticalpixel number/maximum horizontal pixel number calculator 201 calculatesthe maximum number of vertical pixels (H) and the maximum number ofhorizontal pixels (w) indicated by (formula 3a) and (formula 3b) on thebasis of the vertical pixel number information Ihpx and the horizontalpixel number information Iwpx for the input image.

Here, (formula 3a) and (formula 3b) show that the maximum vertical pixelnumber (H) and the maximum horizontal pixel number (W) are both apositive square root of a value that is obtained by multiplying theproduct of the vertical pixel number (h) and the horizontal pixel number(w) of the input image, by N. For example, when N=8, (formula 3a)suggests that the maximum vertical pixel number (H) is decided so thatthe ratio between the vertical pixel number and the horizontal pixelnumber is less than 8:1, and (formula 3b) suggests that the maximumhorizontal pixel number (W) is decided so that the ratio between thevertical pixel number and the horizontal pixel number is less than 1:8.

The operation result signals Op3 a and Op3 b indicating the maximumvertical pixel number (H) and the maximum horizontal pixel number (w)which are obtained by the maximum vertical pixel number/maximumhorizontal pixel number calculator 201 are inputted to the 16-multipleconverter 202, and the 16-multiple converter 202 rounds the maximumvertical pixel number (H) and the maximum horizontal pixel number (W) toa multiple of 16, respectively, by an operation, such as omission,raising, or half-adjust. The 16-multiple converter 202 outputs roundingoperation information Trnd1 indicating a value, i.e., round1(H) that isobtained by rounding the maximum vertical pixel number (H) to a multipleof 16, and rounding operation information Trnd2 indicating a value(round2(H)) that is obtained by rounding the maximum horizontal pixelnumber (W) to a multiple of 16, to the second comparator 204. Further,the second comparator 204 performs comparison between the input imagevertical pixel number (h) and the maximum vertical pixel number (H)(hereinafter, referred to as vertical pixel number comparison) andcomparison between the input image horizontal pixel number (w) and themaximum horizontal pixel number (W) (hereinafter, referred to ashorizontal pixel number comparison), on the basis of the pixel numberinformation Ihpx and Iwpx and the rounding operation information Trnd1and Trnd2, and outputs the comparison result signal Scm2 a indicatingthe result of the vertical pixel number comparison and the comparisonresult signal Scm2 b indicating the result of the horizontal pixelnumber comparison to the AND unit 205.

In this first embodiment, the rounding operation for the maximumvertical pixel number (H) and the maximum horizontal pixel number (W) bythe 16-multiple converter 202 is a processing of rounding these pixelnumbers to multiples of 16. However, the value “16” in the roundingoperation corresponds to the number of pixels that constitute one sideof a macroblock as the unit for coding, and thus in a case where thenumber of pixels that constitute one side of a macroblock is not 16, therounding operation rounds the maximum vertical pixel number and themaximum horizontal pixel number to multiples of a value corresponding tothe number of pixels that constitute one side of a macroblock, which isa value other than 16, is performed. When the rounding operation roundsthe maximum vertical pixel number and the maximum horizontal pixelnumber to multiples of a value corresponding to the number of pixelsthat constitute one side of a macroblock, i.e., a value other than 16,the number of macroblocks in a frame corresponding to an input imagethat can be coded, or the number of macroblocks in the horizontal orvertical direction with respect to the frame is uniquely decided,whereby mapping of image data in the picture memory or the like can beperformed efficiently.

Then, the AND unit 205 takes an AND of the comparison result signal Scm1outputted from the first comparator 203 and the comparison resultsignals Scm2 a and Scm2 b outputted from the second comparator 204, andoutputs a signal, i.e., judgment result signal CSjd indicating a finalresult of the judgment as to coding capability.

Next, a specific operation of the maximum reference picture numbercalculator 109 a in the moving picture coding apparatus 10 a will bedescribed with reference to FIG. 3.

The maximum reference picture number calculator 109 a in the movingpicture coding apparatus 10 a according to the first embodimentcalculates the maximum number of reference candidate pictures to beemployed at inter picture prediction coding on the basis of an operationshown by following (formula 4). Here, (formula 4) is defined by claim 5.Nrpn=Nspx+(h×w)−1  (formula 4)

Here, h denotes the number of vertical pixels in an input image, i.e.,target picture to be coded, and w denotes the number of horizontalpixels in the input image, i.e., target picture to be coded. Nrpndenotes the maximum number of reference pictures, and Nspx denotes themaximum number of storage pixels. In this first embodiment, the maximumstorage pixel number Nspx is the maximum value for the total numbers ofpixels in reference pictures and a target picture to be decoded, whoseimage data are stored in a picture memory of a moving picture decodingapparatus that decodes the bit stream Bsa outputted from the movingpicture coding apparatus 10 a.

The maximum reference picture number calculator 109 a calculates thetotal number of pixels (h×w) in one frame, as the size of the inputimage, on the basis of the input image vertical pixel number informationIhpx and the input image horizontal pixel number information Iwpx. Thatis, the multiplier 401 multiplies the number of vertical pixels in theinput image (h), which is indicated by the input image vertical pixelnumber information Ihpx, by the number of horizontal pixels (w)indicated by the input image horizontal pixel number information Iwpx,and outputs an operation output Ohw indicating the multiplication result(h×w).

Further, the divider 402 divides the maximum storage pixel number (Nspx)by the multiplication result (h×w) on the basis of the operation outputOhw from the multiplier 401 and the maximum storage pixel numberinformation Ispx from the level analyzer 100 a, and outputs an operationoutput signal Dpm indicating the result of division (Nspx/(h×w)).

The subtractor 403 subtracts 1 from the division result (Nspx/(h×w)) onthe basis of the operation output signal Dpn from the divider 402 andthe numeric value information Sn1 from the constant storage unit 404,and outputs a subtraction output signal Sd1 indicating the result ofsubtraction (Nspx/(h×w)−1).

The reason why the subtractor 403 subtracts 1 from the division result(Nspx/(h×w)) is that decoded image data of a picture to be decoded mustbe stored in a picture memory of the decoding apparatus, in addition tothe image data of reference candidate pictures which are employed at theinter picture prediction coding in the decoding apparatus.

As described above, the moving picture coding apparatus 10 a accordingto the first embodiment includes the level analyzer 100 a that decidesthe maximum number of intraframe pixels (Nfpx) which can be coded andthe maximum number of storage pixels (Nspx) which can be stored in thepicture memory of the decoding apparatus, on the basis of the levelsignal Lst indicating a coding level that is designated by the user,thereby judging whether the input image is encodable or not, on thebasis of the maximum intra frame pixel number (Nfpx) and the input imagesize, i.e., the vertical pixel number Nhpx and the horizontal pixelnumber Nwpx, and calculating the number of reference candidate pictures,i.e., reference picture maximum number Nrpn which can be referred to atthe inter picture prediction coding. Therefore, a decoding apparatus towhich a bit stream from the moving picture coding apparatus 10 a issupplied can always decode the bit stream satisfactorily, therebyperforming inter picture prediction decoding corresponding to the interpicture prediction coding on the coding end. Accordingly, it is possibleto design the memory areas in the coding apparatus as well as in thedecoding apparatus which are compliant with a coding method which has norestraint on the capacity of the memory area.

In this first embodiment, as a table that defines the correspondencebetween the plural coding levels, i.e., values of the level identifier,and the maximum intra frame pixel number and the maximum storage pixelnumber, the table T1 in which the coding levels, i.e., values of thelevel identifier are correlated with pairs of the maximum intra framepixel number and the maximum storage pixel number (see FIG. 15) isemployed. However, a table T1 a in which values of the level identifierare correlated with the maximum intra frame pixel numbers (FIG. 16(a))and a table T1 b in which values of the level identifier are correlatedwith the maximum storage pixel numbers (FIG. 16(b)) may be employed.

Further, in this first embodiment, the decision of the coding level,i.e., value of the level identifier by the user is performed withreference to the Table T1 shown in FIG. 15, while the decision of thecoding level by the user may be performed by utilizing following(formula 5), in place of the table T1 shown in FIG. 15.(Level identifier value)=transA(maximum intra frame pixel number,maximum storage pixel number)  (formula 5)

Here, transA( ) is a sign that indicates an operation of giving a valueof the level identifier, using the maximum intra frame pixel number andthe maximum storage pixel number as arguments. According to (formula 5),when the user designates the maximum intra frame pixel number and themaximum storage pixel number of the input image to be coded by themoving picture coding apparatus 10 a, the corresponding value of thelevel identifier is decided.

Further, following (formula 6a) and (formula 6b) may be employed inplace of the table T1 a indicating the correspondence between the levelidentifier value and the maximum intra frame pixel number (FIG. 16(a))and the table T1 b indicating the correspondence between the levelidentifier value and the maximum storage pixel number (FIG. 16(b)).(Level identifier value)=transAa(the maximum intra frame pixelnumber)  (formula 6a)(Level identifier value)=transAb(the maximum storage pixelnumber)  (formula 6b)

Here, transAa( ) is a sign indicating an operation for giving a value ofthe level identifier, using the maximum intra frame pixel number as anargument. According to (formula 6a), when the user designates themaximum intra frame pixel number of the input image which can be codedby the moving picture coding apparatus, the corresponding value of thelevel identifier is decided.

Further, transAb( ) is a sign indicating an operation for giving a valueof the level identifier, using the maximum storage pixel number as anargument. According to (formula 6b), when the user designates themaximum storage pixel number of the input image which can be coded bythe moving picture coding apparatus, the corresponding value of thelevel identifier is decided.

According to the moving picture coding apparatus of the firstembodiment, the maximum storage pixel number is a total number of pixelsin pictures, corresponding to the highest amount of image data that canbe stored in the picture memory of the decoding apparatus to which a bitstream is supplied. However, in place of the maximum storage pixelnumber, the memory capacity itself, which is required by the picturememory of the decoding apparatus may be employed.

In this first embodiment, the maximum storage pixel number Nspx is themaximum value of the total number of pixels in all storage pictureswhose image data are stored in the picture memory of the moving picturedecoding apparatus that decodes a bit stream that is obtained from themoving picture coding apparatus 10 a. The description has been given,taking the case where the reference pictures and the target picture tobe decoded are the storage pictures as an example, but the maximumstorage pixel number may be defined not to include the number of pixelsin the target picture to be decoded.

In this case, following (formula 7a) is employed in place of above(formula 4).Nrpn=Nspx+(h×w)  (formula 7a)

Here, h denotes the number of vertical pixels in a target picture to becoded, w denotes the number of horizontal pixels in the target picture,Nrpn denotes the maximum number of reference pictures, and Nspx denotesthe maximum number of stored pixels.

In the maximum reference picture number calculator 109 a shown in FIG.3, the maximum reference picture number is decided without executing theprocess of subtracting 1 from the division result (Nspx/(h×w)).

Embodiment 2

FIG. 4 is a block diagram for explaining a moving picture codingapparatus 10 b according to a second embodiment of the presentinvention.

The moving picture coding apparatus 10 b according to the secondembodiment has, in place of the level analyzer 100 a and the codingcapability judgment unit 108 a of the moving picture coding apparatus 10a of the first embodiment, a level analyzer 100 b that outputs pixelnumber calculation coefficient information αpx, as well as the maximumintra frame pixel number Ifpx and the maximum storage pixel numberinformation Ispx, on the basis of the level signal Lst and anidentification number signal Cid which are inputted; and a codingcapability judgment unit 108 b that judges whether the input image isencodable or not on the basis of the maximum intra frame pixel numberinformation Ifpx, the pixel number calculation coefficient informationαpx, and the input image size information Ipx. Here, the identificationnumber Cid indicates a value of the identification number decided underthe control by the user, and this identification number is employed toidentify a specific value of the pixel number calculation coefficient asan additional coding condition. The level analyzer 100 b includesinformation of the table T1 shown in FIG. 15 and a table T2 shown inFIG. 17(a). The table T1 shows correspondence between the value of thelevel identifier, and the maximum intra frame pixel number and themaximum storage pixel number. The table T2 shows correspondence betweenthe value of the identification number, and the vertical pixel numbercalculation coefficient (Nαhpx) and the horizontal pixel calculationcoefficient (Nαwpx). Further, pixel number calculation coefficientinformation αpx is composed of information indicating the vertical pixelnumber calculation coefficient (Nαhpx) (hereinafter, referred to asvertical pixel number calculation coefficient information) αhpx andinformation indicating the horizontal pixel number calculationcoefficient (Nαwps) (hereinafter, referred to as horizontal pixel numbercalculation coefficient information) αwpx. The bit stream generator 103of the moving picture coding apparatus 10 b subjects output data, i.e.,coded data Cd from the prediction residual coding unit 102 to variablelength coding, and outputs a bit stream Bsb that is obtained by addingcodes corresponding to the motion vector MV, the mode signal Ms, thelevel signal Lst, and the identification number signal Cid, to the bitstream obtained by the variable length coding.

The constructions of the components other than the moving picture codingapparatus 10 b according to the second embodiment are the same as thoseof the moving picture coding apparatus 10 a according to the firstembodiment.

FIG. 14(b) shows a data structure of a bit stream Bsb corresponding toan input image.

The bit stream Bsb is composed of a header area Hb that contains variouskinds of header information, and a sequence data part Dsq that containscoded data, i.e., bit stream corresponding to image data of eachpicture.

In the header area Hb of the bit stream Bsb, a code H1 corresponding toa signal of the level identifier, i.e., level signal Lst and a code H2corresponding to the identification number signal Cid are included asthe header information. Further, in the sequence data part Dsq of thebit stream Bsb, a sequence header Sh indicating the size of the inputimage, i.e., the input image vertical pixel number (h) and the inputimage horizontal pixel number (w) is included. To be more specific, thecode H2 is obtained by coding the identification number signal Cid thatindicates the value of the identification number for identifying thevertical pixel number calculation coefficient (Nαhpx) and the horizontalpixel number calculation coefficient (Nαwpx), as shown in FIG. 17(a).

FIG. 5 is a diagram illustrating a specific construction of the codingcapability judgment unit 108 b.

This coding capability judgment unit 108 b has, in place of the maximumvertical pixel number/maximum horizontal pixel number calculator 201 ofthe coding capability judgment unit 108 a according to the firstembodiment, a calculator, i.e., maximum vertical pixel number/maximumhorizontal pixel number calculator 301 that calculates the maximumnumber of vertical pixels (H) and the maximum number of horizontalpixels (W) which can be processed, on the basis of the maximum intraframe pixel number information Ifpx, the vertical pixel numbercalculation coefficient information αhpx, and the horizontal pixelnumber calculation coefficient information αwpx, and outputs informationOp3 a and Op3 b indicating the calculation results. Therefore, themultiplier 306, the first comparator 303, the second comparator 304, the16-multiple converter 302, and the AND unit 305 in the coding capabilityjudgment unit 108 b are the same as the multiplier 208, the firstcomparator 203, the second comparator 204, the 16-multiple converter202, and the AND unit 205 in the coding capability judgment unit 108 aaccording to the first embodiment.

Next, the operation will be described.

The operation of the moving picture coding apparatus 10 b according tothe second embodiment is different from that of the moving picturecoding apparatus 10 a according to the first embodiment only in theoperations of the level analyzer 100 b, the coding capability judgmentunit 108 b, and the bit stream generator 103.

Thus, the operations of the level analyzer 100 b, the coding capabilityjudgment unit 108 b, and the bit stream generator 103 will be mainlydescribed hereinafter.

For the moving picture coding apparatus 10 b of the second embodiment,before the coding for an input image is performed, a required level isselected from among plural preset coding levels which are employed ascoding conditions, on the basis of the construction of the memory andthe like in the moving picture coding apparatus 10 b, and theconstruction of a memory and the like in a moving picture decodingapparatus to which coded data are to be supplied, and further a requiredlevel of plural identification numbers, which are employed as additionalcoding conditions is selected. More specifically, the selection of thecoding level is performed by the user with referring to the table T1,and the level signal Lst indicating the level identifier correspondingto the selected level is inputted to the moving picture coding apparatus10 b by the user operation. Further, the selection of the level of theidentification number is performed by the user with referring to thetable T2, and the identification number signal Cid indicating theidentification number corresponding to the selected level is inputted tothe moving picture coding apparatus 10 b by the user operation.

Here, the coding level, the maximum intra frame pixel number, and themaximum storage pixel number are the same as those in the firstembodiment. The table T2 shown in FIG. 17(a) sets four levels of theidentification number, and the respective levels of the identificationnumber correspond to values (1)˜(4) of the identification numbers,respectively. The values (1)˜(4) of the identification number arecorrelated with specific values of the vertical pixel number calculationcoefficient (Nαhpx), and specific values of the horizontal pixel numbercalculation coefficient (Nαwpx), respectively.

According to the moving picture coding apparatus 10 b, when the levelsignal Lst and the identification number signal Cid which are inputtedunder the control by the user are supplied to the level analyzer 100 b,the level analyzer 100 b refers to table T1 (FIG. 15) and table T2 (FIG.17(a)) which are held therein, to output the maximum intra frame pixelnumber information Ifpx and the maximum storage pixel number informationIspx corresponding to the coding level indicated by the level signalLst, which has been selected by the user, and further output the pixelnumber calculation coefficient information αpx corresponding to thelevel of the identification number indicated by the identificationnumber signal Cid, which has been selected by the user. The maximumintra frame pixel number information Ifpx and the pixel numbercalculation coefficient information αpx is inputted to the codingcapability judgment unit 108 b, and the maximum storage pixel numberinformation Ispx is inputted to the maximum reference picture numbercalculator 109 a.

When image data Id of a moving picture (input image) is inputted to thepicture memory 101 in units of pictures in the display order, image datacorresponding to each picture is successively stored in the picturememory 101, and the stored image data SId is outputted from the picturememory 101 in units of blocks, i.e., macroblocks that constitute thepicture in the order of coding. At this time, information indicating thesize of the input image, i.e., input image size information Ipx isoutputted from the picture memory 101 and inputted to the codingcapability judgment unit 108 b and the maximum reference picture numbercalculator 109 a.

Then, the coding capability judgment unit 108 b judges whether the inputimage is encodable or not on the basis of the input image sizeinformation Ipx from the picture memory 101, and the maximum intra framepixel number information Ifpx and the pixel number calculationcoefficient information a px from the level analyzer 100 b, and outputsa signal indicating the judgment result, i.e., judgment result signalCSjd to the control unit 110.

When the judgment result signal CSjd indicates that the input image isencodable, the control unit 110 switches between a mode for performinginter picture prediction coding for image data and a mode for performingintra picture prediction coding for image data, on the basis of theimage data SId from the picture memory 101, and outputs control signalsfor respective units. The respective units of the moving picture codingapparatus 10 b are controlled in accordance with the control signalsSct1, Sct2, . . . , Sctn corresponding to the judgment result signalCSjd, from the control unit 110, like in the first embodiment.

The maximum reference picture number calculator 109 a calculates themaximum number of reference pictures (Nrpn) on the basis of the maximumstorage pixel number information Ispx, and the input image verticalpixel number information Ihpx and horizontal pixel number informationIwpx, and outputs information, i.e., reference picture maximum numberinformation Irpn indicating the calculated number (Nrpn).

In this second embodiment, when the inter picture prediction coding modeis selected, the inter picture prediction coding for the input image isperformed in the same manner as in the first embodiment, and when theintra picture prediction coding mode is selected, the intra pictureprediction coding for the input image is performed in the same manner asin the first embodiment.

In this second embodiment, however, when the inter picture predictioncoding mode is selected, the bit stream generator 103 generates a bitstream corresponding to prediction residual coded data Cd that isoutputted from the prediction residual encoder 102, and outputs thegenerated bit stream together with a code corresponding to the motionvector MV from the motion vector estimation unit 106, a codecorresponding to the mode signal Ms from the control unit 110, a codecorresponding to the level signal Lst, and a code corresponding to theidentification number signal Cid, as a bit stream Bsb (see FIG. 14(b)).When the intra picture prediction coding mode is selected, the bitstream generator 103 generates a bit stream corresponding to coded dataCd that is outputted from the encoder 102, and outputs the generated bitstream together with the code corresponding to the mode signal Ms fromthe control unit 110, the code corresponding to the level signal Lst,and the code corresponding to the identification number signal Cid, as abit stream Bsb (see FIG. 14(b)).

Next, a specific operation of the coding capability judgment unit 108 bof the moving picture coding apparatus 10 b will be described withreference to FIG. 5.

In the coding capability judgment unit 108 b of the moving picturecoding apparatus 10 b according to the second embodiment, the capabilityof the coding for an input image is judged on the basis of the followingconditional formulae (formula 1), (formula 2a), (formula 2b), (formula8a), and (formula 8b). The conditional formulae (formula 1), (formula2a), and (formula 2b) are defined by claim 3, and the conditionalformulae (formula 8a) and (formula 8b) are defined by claim 9.H=Nfpx÷Nαhpx  (formula 8a)W=Nfpx÷Nαwpx  (formula 8b)

Here, Nfpx denotes the maximum number of intra frame pixels, H denotesthe maximum number of vertical pixels in an input image, which can becoded by the moving picture coding apparatus 10 b, and W denotes themaximum number of horizontal pixels in the input image, which can becoded by the moving picture coding apparatus 10 b. Nαhpx denotes avertical pixel number calculation coefficient, and N a wpx denotes ahorizontal pixel number calculation coefficient.

Initially, like the coding capability judgment unit 108 a according tothe first embodiment, the coding capability judgment unit 108 b performsthe operation indicated by (formula 1) on the basis of the input imagevertical pixel number information Ihpx and horizontal pixel numberinformation Iwpx included in the input image size information Ipx, whichis outputted from the picture memory 101. More specifically,multiplication for obtaining the product (h×w) of the number of verticalpixels (h) and the number of horizontal pixels (w) in the input image iscarried out by the multiplier 306, and comparison between themultiplication result (h×w) and the maximum intra frame pixel number(Nfpx) is carried out by the first comparator 303. The first comparator303 outputs a comparison result signal Scm1 indicating the result ofcomparison to the AND unit 305.

Then, in the coding capability judgment unit 108 b, the maximum verticalpixel number/maximum horizontal pixel number calculator 301 calculatesthe maximum number of vertical pixels (H) indicated by (formula 8a) andthe maximum number of horizontal pixels indicated by (formula 8b) on thebasis of the maximum intra frame pixel number information Ifpx, thevertical pixel number calculation coefficient information a hpx, and thehorizontal pixel number calculation coefficient information αwps.

Here, (formula 8a) and (formula 8b) indicate that the maximum verticalpixel number (H) and the maximum horizontal pixel number (W) areobtained by dividing the maximum intra frame pixel number (Nfpx) by thevertical pixel number calculation coefficient (Nαhpx) and the horizontalpixel number calculation coefficient (Nαwpx), respectively.

The operation result signals Op3 a and Op3 b indicating the maximumvertical pixel number (H) and the maximum horizontal pixel number (W)which are obtained by the maximum vertical pixel number/maximumhorizontal pixel number calculator 301 are inputted to the 16-multipleconverter 302, and the 16-multiple converter 302 performs a roundingprocess for the maximum vertical pixel number (H) and the maximumhorizontal pixel number (w), in the same manner as in the 16-multipleconverter 202 according to the first embodiment. Then, the 16-multipleconverter 302 outputs rounding operation information Trnd1 indicating avalue (round1(H)) that is obtained by rounding the maximum verticalpixel number (H) to a multiple of 16, and rounding operation informationTrnd2 indicating a value (round2(H)) that is obtained by rounding themaximum horizontal pixel number (w) to a multiple of 16, to the secondcomparator 304.

Further, the second comparator 304 performs comparison between the inputimage vertical pixel number (h) and the maximum vertical pixel number(H) (vertical pixel number comparison) and comparison between the inputimage horizontal pixel number (w) and the maximum horizontal pixelnumber (W) (horizontal pixel number comparison), on the basis of thepixel number information Ihpx and Iwpx, and the rounding operationinformation Trnd1 and Trnd2, and outputs a comparison result signal Scm2a indicating the result of the vertical pixel number comparison, and acomparison result signal Scm2 b indicating the result of the horizontalpixel number comparison, to the AND unit 305.

Then, the AND unit 305 takes an AND of the comparison result signalsScm1, Scm2, and Scm2 b which are outputted from the comparators 303 and304, and outputs a signal CSjd indicating the final result of thejudgement as to the coding capability/incapability.

As described above, the moving picture coding apparatus 10 b of thesecond embodiment includes the level analyzer 100 b that decides themaximum number of intra frame pixels (Nfpx) which can be coded and themaximum number of storage pixels (Nspx) which can be stored in a picturememory of a decoding apparatus in accordance with the level signal(signal of the level identifier) Lst that is inputted by the useroperation, and further decides the pixel calculation coefficientinformation αpx indicating the vertical pixel number calculationcoefficient (Nαhpx) and the horizontal pixel number calculationcoefficient (Nαwpx) on the basis of the identification number signal Cidthat is inputted by the user operation, thereby judging whether codingof an input image is possible or not, and calculating the number ofreference candidate pictures which can be referred to at the interpicture prediction coding (reference picture maximum number) Nrpn, onthe basis of the maximum intra frame pixel number (Nfpx), the verticalpixel number calculation coefficient (Nαhpx), the horizontal pixelnumber calculation coefficient (Nαwpx), and the input image size (thenumber of vertical pixels (h) and the number of horizontal pixels (w)).Therefore, a decoding apparatus to which a bit stream from the movingpicture coding apparatus 10 b is to be supplied always can decode thebit stream satisfactorily, whereby picture prediction decoding dependingon the picture prediction coding on the coding end can be performed.Thereby, it is possible to design memory areas in the coding apparatusand the decoding apparatus corresponding to a coding method in whichthere is no restraint on the capacity of the memory area.

Further, in this second embodiment, the maximum number of verticalpixels (H) and the maximum number of horizontal pixels (w) are obtainedby dividing the maximum intra frame pixel number (Nfpx) by the verticalpixel number calculation coefficient (Nαhpx) and the horizontal pixelnumber calculation coefficient (Nαwpx), respectively. Therefore, theprocesses for obtaining the maximum vertical pixel number (H) and themaximum horizontal pixel number (w) are facilitated as compared to thefirst embodiment.

In this second embodiment, the level identifier corresponding to themaximum intra frame pixel number (Nfpx) and the maximum storage pixelnumber (Nspx), and the identification number corresponding to thevertical pixel number calculation coefficient (N60 hpx) and thehorizontal pixel number calculation coefficient (Nαwpx) are parametersindicating independent coding conditions, respectively, while theidentification number may be correlated with the value of the levelidentifier.

In this case, when the coding level is decided, specific numeric valuesof the vertical pixel number calculation coefficient (Nαhpx) and thehorizontal pixel number calculation coefficient (Nαwpx) as well asspecific numeric values of the maximum intra frame pixel number (Nfpx)and the maximum storage pixel number (Nspx) are decided on the basis ofthe value of the level identifier that indicates the decided level. Morespecifically, when the level signal Lst indicating the coding level thatis decided by the user is inputted to the level analyzer 100 b, thelevel analyzer 100 b outputs the information Ifps and Ispx indicatingthe maximum intra frame pixel number (Nfpx) and the maximum storagepixel number (Nspx) according to the level signal (level identifier)Lst, and further outputs pixel number calculation coefficientinformation αpx on the basis of the identification number signalcorresponding to the level identifier. Further, the bit stream Bsbcontains only the code H1 corresponding to the level signal Lst, andthus the code H2 corresponding to the identification number signal Cidis not transmitted to the decoding end.

In this second embodiment, the moving picture coding apparatus transmitsthe code H1 of the level signal Lst corresponding to the maximum intraframe pixel number (Nfpx) and the maximum storage pixel number (Nspx),which has been selected by the user, and the code H2 of theidentification number signal Cid corresponding to the vertical pixelnumber calculation coefficient (Nαhpx) and the horizontal pixel numbercalculation coefficient (Nαwpx), which has been selected by the user, tothe decoding end. However, the moving picture coding apparatus mayencode the pixel number calculation coefficient information αpxindicating arbitrary vertical pixel number calculation coefficient(Nαhpx) and horizontal pixel number calculation coefficient (Nαwpx)which are decided by the user, and output the encoded pixel numbercalculation coefficient information αpx to the decoding end, in place ofthe code H2 of the identification number signal Cid.

In this case, the maximum intra frame pixel number (Nfpx) and themaximum storage pixel number (Nspx) are set at specific valuescorresponding to the level identifier that indicates the selected codinglevel on the basis of the Table T1, while specific values of thevertical pixel number calculation coefficient (Nαhpx) and the horizontalpixel number calculation coefficient (Nαwpx) are arbitrarily set by theuser. That is, when the level signal Lst indicating the decided codinglevel is inputted to the level analyzer 100 b under the control of theuser, the level analyzer 100 b outputs the information Ifpx indicatingthe maximum intra frame pixel number (Nfpx) that is decided on the basisof the table T1 in accordance with the level signal Lst, to the codingcapability judgment unit 108 b, and outputs the information Ispxindicating the maximum storage pixel number (Nspx) that is decided onthe basis of the table T1, to the maximum reference picture calculator109 a. The bit stream Bsb contains the code H1 corresponding to thelevel signal Lst and the code corresponding to the pixel numbercalculation coefficient information αpx, and accordingly the code H1corresponding to the level signal Lst and the code corresponding to thepixel number calculation coefficient information αpx are transmitted tothe decoding end.

Further, in this second embodiment, the table T2 in which pluralidentification numbers are correlated with pairs of the vertical pixelnumber calculation coefficient and the horizontal pixel numbercalculation coefficient (FIG. 17(a)) is employed as the table thatdefines the correspondence between plural identification numbers, andthe vertical pixel number calculation coefficient and horizontal pixelnumber calculation coefficient. However, in place of the table T2, atable T2 a in which the values of the identification number arecorrelated with the vertical pixel number calculation coefficients (FIG.17(b) and a table T2 b in which the values of the identification numberare correlated with the horizontal pixel number calculation coefficients(FIG. 17(c)) may be employed.

Further, in this second embodiment, the decision of the identificationnumber by the user is performed with referring to the table T2 as shownin FIG. 17(a), while the decision of the identification number by theuser may be performed using a following (formula 9), in place of thetable T2 shown in FIG. 17(a).(Identification number)=transB(vertical pixel number calculationcoefficient, horizontal pixel number calculation coefficient)  (formula9)

Here, transB( ) is a sign indicating an operation for obtaining thevalue of the identification number, using the vertical pixel numbercalculation coefficient and the horizontal pixel number calculationcoefficient as arguments.

Further, in place of the table T2 a that defines the correspondencebetween the values of the identification number and the vertical pixelnumber calculation coefficients (FIG. 17(b)) and the table T2 b thatdefines the correspondence between the values of the identificationnumber and the horizontal pixel number calculation coefficients (FIG.17(c)), following (formula 9a) and (formula 9b) may be employed.(Value of the identification number)=transBa(vertical pixel numbercalculation coefficient)  (formula 9a)(Value of the identification number)=transBb(horizontal pixel numbercalculation coefficient)  (formula 9b)

Here, transBa( ) is a sign that indicates an operation for obtaining avalue of the identification number, using the vertical pixel numbercalculation coefficient as an argument. According to the (formula 9a),when the user designates the vertical pixel number calculationcoefficient for the input image that can be coded by the moving picturecoding apparatus, the corresponding value of the identification numberis decided.

Further, transBb( ) is a sign that indicating an operation for obtaininga value of the identification number, using the horizontal pixel numbercalculation coefficient as an argument. According to the (formula 9b),when the user designates the horizontal pixel number calculationcoefficient for the input image that can be coded by the moving picturecoding apparatus, the corresponding value of the identification numberis decided.

In the above first embodiment, the maximum number of vertical pixels (H)and the maximum number of horizontal pixels (W) are obtained by the(formula 1), (formula 2a), (formula 2b), (formula 3a), and (formula 3b),while in this second embodiment, the maximum number of vertical pixels(H) and the maximum number of horizontal pixels (W) are obtained by the(formula 1), (formula 2a), (formula 2b), (formula 8a), and (formula 8b).However, the method for obtaining the maximum vertical pixel number (H)and the maximum horizontal pixel number (W) are not limited to thosedescribed in the first and second embodiments.

Embodiment 3

FIG. 6 is a block diagram for explaining a moving picture codingapparatus 10 c according to a third embodiment of the present invention.

The moving picture coding apparatus 10 c of the third embodiment has, inplace of the level analyzer 100 a and the coding capability judgmentunit 108 a of the moving picture coding apparatus 10 a according to thefirst embodiment, a level analyzer 100 c that outputs informationindicating the maximum image size (maximum image size information) Impxtogether with the maximum intra frame pixel number information Ifpx andthe maximum storage pixel number information Ispx, in accordance withthe inputted level signal Lst and identification number signal Sid, anda coding capability judgment unit 108 c that judges whether coding ofthe input image is possible or not on the basis of the maximum intraframe pixel number information Ifpx, the maximum image size informationImpx, and the input image size information Ipx.

Here, the identification number signal Sid indicates a value of theidentification number decided by the user's operation, and theidentification number identifies a specific value of the maximum imagesize as an additional coding condition. The level analyzer 100 cincludes the information of the table T1 shown in FIG. 15, andinformation of a table T3 shown in FIG. 18(a). The table T1 definescorrespondence between the value of the identification number, and themaximum intra frame pixel number and the maximum storage pixel number.The table T3 shows correspondence between the value of theidentification number, and the maximum vertical pixel number (H) andhorizontal pixel maximum number (W). Further, the maximum image sizeinformation Impx is composed of information indicating the maximumnumber (H) of vertical pixels (vertical pixel maximum numberinformation) Imhpx, and information indicating the maximum number (W) ofhorizontal pixels (horizontal pixel maximum number information) Imwpx.The bit stream generator 103 of the moving picture coding apparatus 10 cvariable-length-codes the output data (coded data) Cd from theprediction residual encoder 102, and outputs a bit stream Bsc that isobtained by adding codes corresponding to the motion vector MV, the modesignal Ms, the level signal Lst, and the identification number signalSid, to a bit stream obtained by the variable length coding.

Constructions of the other components of the moving picture codingapparatus 10 c according to the third embodiment are the same as thoseof the moving picture coding apparatus 10 a of the first embodiment.

FIG. 14(c) shows a data structure of the bit stream Bsc corresponding toan input image.

The bit stream Bsc is composed of a header area Hc that contains variouskinds of header information, and a sequence data part Dsq that containscoded data (a bit stream) corresponding to image data of each picture.

In the header area Hc of the bit stream Bsc, a code H1 corresponding tothe level identifier and a code H3 corresponding to the identificationnumber signal Sid are included as header information. Further, in thesequence data part Dsq of the bit stream Bsc, a sequence header Shindicating the size of the input image, i.e., the input image verticalpixel number and the input image horizontal pixel number are included.More specifically, the code H3 is obtained by encoding theidentification number signal Sid that indicates a value of theidentification number for identifying the maximum vertical pixel numberand the maximum horizontal pixel number as shown in FIG. 18(a).

FIG. 7 is a diagram illustrating a specific construction of the codingcapability judgment unit 108 c.

The coding capability judgment unit 108 c is constituted only by themultiplier 206, the first comparator 203, the second comparator 204, andthe AND unit 205 of the coding capability judgment unit 108 a accordingto the first embodiment. In place of the outputs Trnd1 and Trnd2 fromthe 16-multiple converter 202 in the coding capability judgment unit 108a according to the first embodiment, the maximum vertical pixel numberinformation Imhpx indicating the maximum number of vertical pixels (H)and the maximum horizontal pixel number information Imwpx indicating themaximum number of horizontal pixels (W) is inputted from the levelanalyzer 100 c to the second comparator 204 as information indicatingthe maximum image size (maximum image size information) Impx.

Next, the operation will be described.

The operation of the moving picture coding apparatus 10 c according tothe third embodiment is different from the operation of the movingpicture coding apparatus 10 a of the first embodiment only in theoperations of the level analyzer 10 c, the coding capability judgmentunit 108 c, and the bit stream generator 103.

For the moving picture coding apparatus 10 c according to the thirdembodiment, before the coding of an input image is performed, a requiredlevel is selected from plural preset coding levels to be employ ascoding conditions, on the basis of the constructions of the memory orthe like in the moving picture coding apparatus 10 c, and a constructionof a memory or the like in the moving picture decoding apparatus towhich coded data are supplied, and further a predetermined level isselected from among plural levels of the identification number, whichare employed as additional coding conditions. To be more specific, theselection of the coding level is performed by the user with referring tothe table T1, and the level signal (level identifier) Lst indicating theselected level is inputted to the moving picture coding apparatus 10 cunder the control of the user. The selection of the level of theidentification number is performed by the user with referring to thetable T3, and the identification number signal Sid indicating theidentification number corresponding to the selected level is inputted tothe moving picture coding apparatus 10 c under the control of the user.

Here, the coding level, the maximum intra frame pixel number, and themaximum storage pixel number are identical to those of the firstembodiment. In addition, the table T3 shown in FIG. 18(a) defines fourlevels of the identification number, and these levels of theidentification number correspond to values (1)˜(4) of the identificationnumber, respectively. The values (1)˜(4) of the identification numberare correlated with specific values of the maximum vertical pixel number(H) and the maximum horizontal pixel number (W), respectively.

In the moving picture coding apparatus 10 c, when the level signal Lstand the identification number signal Sid which are inputted by the user'operation are supplied to the level analyzer 100 c, the level analyzer10 c refers to the table T1 (FIG. 15) and the table T3 (FIG. 18(a))which are held therein, and outputs the maximum intra frame pixel numberinformation Ifpx and the maximum storage pixel number information Ispxcorresponding to the coding level indicated by the level signal Lst,which has been selected by the user, and further outputs the maximumimage size information Imps corresponding to the level of theidentification number indicated by the identification number signal Sid,which has been selected by the user. The maximum intra frame pixelnumber information Ifpx and the maximum image size information Impx isinputted to the coding capability judgment unit 108 c, and the maximumstorage pixel number information Ispx is inputted to the maximumreference picture calculator 109 a.

Then, when image data Id of a moving picture (input image) is inputtedto the picture memory 101 in units of pictures in the display order,image data corresponding to each picture are successively stored in thepicture memory 101, and the stored image data SId are outputted from thepicture memory 101 in units of blocks (macroblocks) that constitute thepicture in the coding order. At this time, information indicating thesize of the input data (input image size information) Ipx is outputtedfrom the picture memory 101 to the coding capability judgment unit 108 cand the maximum reference picture calculator 109 a.

Then, the coding capability judgment unit 108 c judges whether coding ofthe input image is possible or not, on the basis of the input image sizeinformation Ipx outputted from the picture memory 101, and the maximumintra frame pixel number information Ifpx and the maximum image sizeinformation Impx outputted from the level analyzer 100 c, and outputs asignal indicating the judgement result (judgement result signal) CSjd tothe control unit 110.

When the judgement result signal CSjd indicates that the coding of theinput image is possible, the control unit 110 performs switching betweena mode of performing inter picture prediction coding for image data anda mode of performing intra picture prediction coding for image data, onthe basis of the image data SId from the picture memory 101, and outputscontrol signals for the respective components. The respective componentsof the moving picture coding apparatus 10 c are controlled in accordancewith control signals Sct1, Sct2, . . . , Sctn from the control unit 110according to the judgement result signal CSjd, like in the firstembodiment.

Further, the maximum reference picture calculator 109 a calculates themaximum number of reference pictures (Nrpn) on the basis of the maximumstorage pixel number information Ispx, the input image vertical pixelnumber information Ihpx, and the input image horizontal pixel numberinformation Iwpx, and outputs information indicating the calculatednumber (Nrpn) (reference picture maximum number information) Irpn.

In this third embodiment, when the inter picture prediction coding modeis selected, the inter picture prediction coding for the input image isperformed in the same manner as the first embodiment, while when theintra picture prediction coding mode is selected, the intra pictureprediction coding for the input image is performed in the same manner asthe first embodiment.

In the third embodiment, however, when the inter picture predictioncoding mode is selected, the bit stream generator 103 generates a bitstream corresponding to prediction residual coded data Cd that isoutputted from the prediction residual encoder 102, and outputs thegenerated bit stream together with a code corresponding to the motionvector MV from the motion vector estimation unit 106, a codecorresponding to the mode signal Ms from the control unit 110, a codecorresponding to the level signal Lst, and a code corresponding to theidentification number signal Sid, as a bit stream Bsc (see FIG. 14(c)).When the intra picture prediction coding mode is selected, the bitstream generator 103 generates a bit stream corresponding to the codeddata Cd that is outputted from the encoder 102, and outputs thegenerated bit stream together with a code corresponding to the modesignal Ms from the control unit 110, a code corresponding to the levelsignal Lst, and a code corresponding to the identification number signalSid, as a bit stream Bsc (see FIG. 14(c)).

Next, a specific operation of the coding capability judgment unit 108 cin the moving picture coding apparatus 10 c will be described withreference to FIG. 7.

The coding capability judgment unit 108 c of the moving picture codingapparatus 10 c according to the third embodiment judges whether codingof an input image is possible or not, on the basis of theabove-mentioned conditional formulas (formula 1), (formula 2a), and(formula 2b). In other words, the maximum number of vertical pixels (H)and the maximum number of horizontal pixels (W) are obtained on thebasis of the (formula 1), (formula 2a), (formula 2b), and theinformation of the table T3 shown in FIG. 18(a). Here, the (formula 1),(formula 2a), and (formula 2b) are defined by claim 3.

More specifically, in this third embodiment, the level analyzer 10 cincludes the table T3 as shown in FIG. 18(a) and, in the codingcapability judgment unit 108 c of the third embodiment, the informationImhpx and Imwpx indicating the maximum vertical pixel number (H) and themaximum horizontal pixel number (W), which is outputted from the levelanalyzer 100 c on the basis of the table T3, is directly input to thesecond comparator 204.

Then, the second comparator 204 performs comparison between the inputimage vertical pixel number (h) and the maximum vertical pixel number(H) (i.e., vertical pixel number comparison), and comparison between theinput image horizontal pixel number (w) and the maximum horizontal pixelnumber (W) (i.e., horizontal pixel number comparison), and outputs acomparison result signal Scm2 a indicating the result of the verticalpixel number comparison, and a comparison result signal Scm2 bindicating the result of the horizontal pixel number comparison to theAND unit 205.

As described above, the moving picture coding apparatus 10 c of thethird embodiment includes the level analyzer 100 c that decides themaximum number of intra frame pixels (Nfpx) which can be coded and themaximum number of storage pixels (Nspx) which can be stored in a picturememory of a decoding apparatus, in accordance with the level signal(level identifier signal) Lst that is inputted under the control of theuser, and decides the maximum number of vertical pixels (H) and themaximum number of horizontal pixels (W) in accordance with theidentification number signal Sid that is inputted under the control ofthe user, thereby judging whether coding of the input image is possibleor not on the basis of the maximum intra frame pixel number (Nfpx), themaximum vertical pixel number (H), the maximum horizontal pixel number(W), and the input image size (the number of vertical pixels (h) and thenumber of horizontal pixels (w)), and calculating the number ofreference candidate pictures (reference picture maximum number) Nrpnwhich can be referred to at the inter picture prediction coding.Therefore, the decoding apparatus to which a bit stream from the movingpicture coding apparatus 10 c is supplied can always decode the bitstream satisfactorily, whereby picture prediction decoding correspondingto the picture prediction coding on the coding end can be performed.Accordingly, memory areas in the coding apparatus and the decodingapparatus corresponding to a coding method in which there is norestraint on the capacity of the memory area can be designed.

In this third embodiment, the values indicated by the information Impxthat is supplied from the level analyzer 100 c are employed as themaximum vertical pixel number (H) and the maximum horizontal pixelnumber (W). Therefore, the process for obtaining the maximum verticalpixel number (H) and the maximum horizontal pixel number (W) isfacilitated as compared to the first embodiment.

In this third embodiment, the level identifier corresponding to themaximum intra frame pixel number (Nfpx) and the maximum storage pixelnumber (Nspx), and the identification number corresponding to themaximum vertical pixel number (H) and the maximum horizontal pixelnumber (W) are used as parameters that indicate independent codingconditions, respectively. However, the values of the identificationnumber may be correlated with the values of the level identifier.

In this case, specific values of the maximum intra frame pixel number(Nfpx) and the maximum storage pixel number (Nspx) are values which aredecided on the basis of the table T1 according to the level identifierthat indicates the selected coding level, and further specific values ofthe maximum vertical pixel number (H) and the maximum horizontal pixelnumber (W) are values which are decided on the basis of the table T3according to the identification number that is correlated with theselected coding level. That is, when the level signal Lst indicating thedecided coding level is inputted to the level analyzer 100 c under thecontrol of the user, the level analyzer 10 c outputs the informationIfpx and Ispx indicating the maximum intra frame pixel number (Nfpx) andthe maximum storage pixel number (Nspx) in accordance with the levelsignal Lst, and further outputs the maximum image size information Impxon the basis of the identification number corresponding to the levelidentifier. In addition, the bit stream Bsc includes only the code H1corresponding to the level signal Lst, and thus the code H3corresponding to the identification number signal Sid is not transmittedto the decoding end.

In this third embodiment, the moving picture coding apparatus transmitsthe code of the level signal Lst corresponding to the maximum intraframe pixel number (Nfpx) and the maximum storage pixel number (Nspx)which have been selected by the user, and the code H3 of theidentification number signal Sid corresponding to the maximum verticalpixel number (H) and the maximum horizontal pixel number (W) which havebeen selected by the user, to the decoding end. However, the movingpicture coding apparatus may encode the maximum image size informationImpx indicating the maximum vertical pixel number (H) and the maximumhorizontal pixel number (W) which have been arbitrarily decided by theuser, to transmit the coded maximum pixel number information to thedecoding end, in place of the code H3 of the identification numbersignal Sid.

In this case, specific values of the maximum intra frame pixel number(Nfpx) and the maximum storage pixel number (Nspx) are values which aredecided on the basis of the table T1 according to the level identifierthat indicates the selected coding level, while specific values of themaximum vertical pixel number (H) and the maximum horizontal pixelnumber (W) are arbitrarily decided by the user. That is, when the levelsignal Lst indicating the decided coding level is input to the levelanalyzer 100 c under the control of the user, the level analyzer 100 coutputs the information Ifpx indicating the maximum intra frame pixelnumber (Nfpx) that is selected from the table T1 in accordance with thelevel signal Lst, to the coding capability judgment unit 108 c, andoutputs the information Ispx indicating the maximum storage pixel number(Nspx) that is selected from the table T1, to the maximum referencepicture calculator 109 a. Further, the maximum image size informationImpx indicating specific values of the maximum vertical pixel number (H)and the maximum horizontal pixel number (W) which have been decided bythe user is inputted directly from outside to the coding capabilityjudgment unit 108 c. In addition, the bit stream Bsc includes the codeH1 corresponding to the level signal Lst and the code corresponding tothe maximum image size information Impx, and thus the code H1corresponding to the level signal Lst and the code corresponding to themaximum image size information Impx are transmitted to the decoding end.

Further, in this third embodiment, the table T3 in which plural valuesof the identification number are correlated with pairs of the maximumvertical pixel number and the maximum horizontal pixel number (FIG.18(a)) is employed as a table that defines correspondence between pluralvalues of the identification number, and the maximum vertical pixelnumber and maximum horizontal pixel number. However, a table T3 a inwhich values of the identification number are correlated with themaximum vertical pixel numbers (H) (FIG. 18(b)), and a table T3 b inwhich values of the identification number are correlated with themaximum horizontal pixel numbers (W) (FIG. 18(c)) may be employed inplace of the table T3. Further, it goes without saying that the numberof combinations of the maximum vertical pixel number and the maximumhorizontal pixel number in the tables T3, T3 a, and T3 b, and theirvalues are not limited to those shown in FIGS. 18(a) to 18(c).

Further, in the descriptions of the first to third embodiments,limitations on the number of vertical pixels and the number ofhorizontal pixels in an input image that can be coded are imposed by the(formula 2a) and (formula 2b), while the limitation the size of theinput image that can be coded may be imposed by limiting only one of thenumber of vertical pixels and the number of horizontal pixels.

Further, it is also possible to judge whether the coding of an inputimage is possible or not, only on the basis of comparison between themaximum intra frame pixel number, and the numbers of vertical andhorizontal pixels in the input image as indicated by the (formula 1),without utilizing the (formula 2a), (formula 2b), (formula 3a), (formula3b), (formula 8a), and (formula 8b) which have been employed in any ofthe above-mentioned embodiments.

In the third embodiment, the decision of the value of the identificationnumber is performed by the user with referring to the table T3 shown inFIG. 18(a), but the decision of the identification number may beperformed by the user using a following (formula 10), in place of thetable T3 shown in FIG. 18(a).(Identification number)=transC(the maximum number of vertical pixels,the maximum number of horizontal pixels)  (formula 10)

Here, transC is a sign that indicates an operation for obtaining anidentification number, using the maximum number of vertical pixels andthe maximum number of horizontal pixels as arguments. According to the(formula 10), when the maximum number of vertical pixels and the maximumnumber of horizontal pixels in the input image which can be coded by themoving picture coding apparatus are designated by the user, thecorresponding value of the identification number is decided.

Further, following (formula 10a) and (formula 10b) may be employed inplace of the table T3 a indicating the correspondence between values ofthe identification number and the maximum vertical pixel numbers (FIG.18(b)) and the table T3 b indicating the correspondence between valuesof the identification number and the maximum horizontal pixel numbers(FIG. 18(c)).(Identification number)=transCa(the maximum number of verticalpixels)  (formula 10a)(Identification number)=transCb(the maximum number of horizontalpixels)  (formula 10b)

Here, transCa( ) is a sign indicating an operation for obtaining a valueof the identification number, using the maximum number of verticalpixels as an argument. According to the (formula 10a), when the userdesignates the maximum number of vertical pixels in the input imagewhich can be coded by the moving picture coding apparatus, thecorresponding value of the identification number is decided.

Further, transCb( ) is a sign indicating an operation for obtaining avalue of the identification number, using the maximum number ofhorizontal pixels as an argument. According to the (formula 10b), whenthe user designates the maximum number of horizontal pixels in the inputimage which can be coded by the moving picture coding apparatus, thecorresponding value of the identification number is decided.

Embodiment 4

FIG. 8 is a block diagram for explaining a moving picture codingapparatus 10 d according to a fourth embodiment of the presentinvention.

The moving picture coding apparatus 10 d of the fourth embodiment has,in place of the maximum reference picture calculator 109 a of the movingpicture coding apparatus 10 a according to the first embodiment, amaximum reference picture calculator 109 d that calculates the maximumnumber of reference pictures (Nrpn) on the basis of the size informationIpx for an input image (input image vertical pixel number informationIhpx and input image horizontal pixel number information Iwpx), themaximum storage pixel number information Ispx, and display waiting pixelnumber information Idwp, and outputs information indicating thecalculated value (Nrpn) (i.e., reference picture maximum numberinformation) Irpn.

Here, the display waiting pixel number information Idwp is informationthat indicates the number of display wait pictures. The display waitpictures are previously decoded pictures that are not employed asreference pictures, as described above with reference to FIG. 26, andimage data of the pictures are stored in a picture memory of a decodingapparatus until they are displayed. Further, the control of the picturememory according to the fourth embodiment is performed adaptively to thecontrol of a picture memory in a decoding apparatus, so that image dataof a picture that is not employed as a reference picture is deleted fromthe picture memory immediately after display of the picture is finished.

Constructions of other components in the moving picture coding apparatus10 d according to the fourth embodiment are the same as those in themoving picture coding apparatus 10 a of the first embodiment.

FIG. 9 is a diagram illustrating a specific construction of the maximumreference picture calculator 109 d.

This maximum reference picture calculator 109 d includes, in addition tothe multiplier 401, the divider 402, the subtractor 403, and theconstant storage unit 404 in the maximum reference picture calculator109 a according to the first embodiment, a subtractor 405 that subtractsthe number of display wait pictures (Ndwp) in the picture memory fromthe number of pictures indicated by the operation output Sd1 from thesubtractor 403, on the basis of the picture number information Idwp fromthe picture memory 105, and outputs an output signal Sd2 from thesubtractor 405 as reference picture maximum number information Irpn.

Next, its operation will be described.

The operation of the moving picture coding apparatus 10 d according tothe fourth embodiment is different from that of the moving picturecoding apparatus 10 a according to the first embodiment only in theoperation of the maximum reference picture calculator 109 d.

Thus, only the operation of the maximum reference picture calculator 109d will be described hereinafter with reference to FIG. 9.

The maximum reference picture calculator 109 d of the moving picturecoding apparatus 10 d according to the fourth embodiment calculates themaximum number of reference candidate pictures which are employed at theinter picture prediction coding, according to an operation indicated bya following (formula 11). Here, the (formula 11) is defined by claim 6.Nrpn=Nspx+(h×w)−1−Ndwp  (formula 11)

Here, h designates the number of vertical pixels in the input image(target picture to be coded), and w designates the number of horizontalpixels in the input image (the target picture). Nrpn designates themaximum number of reference pictures, Nspx designates the maximum numberof storage pixels, and Ndwp designates the number of display waitingdecoded pictures. In this fourth embodiment, the maximum storage pixelnumber Nspx is the maximum value of the total number of pixelscorresponding to all storage pictures whose image data are stored in apicture memory of a moving picture decoding apparatus that decodes a bitstream obtained by the moving picture coding apparatus 10 d. The storagepictures are reference pictures, a target picture to be decoded, anddisplay waiting decoded pictures.

The maximum reference picture calculator 109 d calculates the totalnumber of pixels in one frame (h×w), corresponding to the size of theinput image on the basis of input image vertical pixel numberinformation Ihpx and input image horizontal pixel number informationIwpx. More specifically, the multiplier 401 multiplies the number ofvertical pixels (h) in the input image, which is indicated by the inputimage vertical pixel number information Ihpx, by the number ofhorizontal pixels (w), which is indicated by the input image horizontalpixel number information Iwpx, and outputs an operation output Shwindicating the multiplication result (h×w).

The divider 402 divides the maximum storage pixel number (Nspx) by themultiplication result (h×w) on the basis of the operation output Shwfrom the multiplier 401 and the maximum storage pixel number informationIspx from the level analyzer 10 a, and outputs an operation outputsignal Dpm indicating the division result (Nspx/(h×w)).

The subtractor 403 subtracts 1 from the division result (Nspx/(h×w)) onthe basis of the output signal Dpm from the divider 402 and the numericvalue information Sn1 from the constant storage unit 404, and outputs asubtraction output signal Sd1 indicating the subtraction result(Nspx/(h×w)−1).

Further, the subtractor 405 subtracts the number of display waitpictures (Ndwp) from the subtraction result (Nspx/(h×w)−1) on the basisof the subtraction output signal Sd1, and the picture number informationIdwp from the picture memory, thereby deciding the maximum number ofreference pictures.

The reason why the subtractors 403 and 405 subtracts 1 and the number ofdisplay wait pictures (Ndwp) from the division result (Nspx/(h×w)),respectively, is that decoded image data of a target picture to bedecoded and display wait pictures, as well as image data of referencecandidate pictures which are employed at the inter picture predictiondecoding must be stored in the picture memory of the decoding apparatus.

As described above, the moving picture coding apparatus 10 d of thefourth embodiment includes the level analyzer 100 a that decides themaximum number of intra frame pixels (Nfpx) which can be coded and themaximum number of storage pixels (Nspx) which can be stored in thepicture memory of the decoding apparatus, on the basis of the levelsignal LSt that indicates a coding level designated by the user, therebyperforming the judgement as to whether the coding of an input image ispossible or not on the basis of the maximum intra frame pixel number(Nfpx) and the input image size (the number of vertical pixels Nhpx andthe number of horizontal pixels Nwpx), and calculating the number ofreference candidate pictures which can be referred to at the interpicture prediction coding (reference picture maximum number) Nrpn.Therefore, a decoding apparatus to which a bit stream from the movingpicture coding apparatus 10 b is supplied can always decode the bitstream satisfactorily, whereby picture prediction decoding correspondingto picture prediction coding on the coding end can be performed.Accordingly, memory areas of the coding apparatus and the decodingapparatus that are compliant with a coding method in which there is norestraint on the capacity of the memory areas can be designed.

In this fourth embodiment, the maximum number of reference pictureswhich are stored in the picture memory is decided in view of the numberof display wait pictures (Ndwp), whereby the picture memory in whichimage data of reference candidate pictures are stored can be efficientlyemployed according to the status of the processing for image data.

In the fourth embodiment, the maximum storage pixel number Nspx is themaximum value of the total number of pixels corresponding to all storagepictures whose image data are stored in a picture memory of a movingpicture decoding apparatus that decodes a bit stream obtained by themoving picture coding apparatus 10 d, and the storage pictures arereference pictures, a target picture to be decoded, and display waitingdecoded pictures. However, it is possible to define the maximum storagepixel number not to include the number of pixels corresponding to thetarget picture to be decoded.

In this case, a following (formula 11a) is employed in place of the(formula 11).Nrpn=Nspx+(h×w)−Ndwp  (formula 11a)

Thus, the maximum reference picture calculator 109 d shown in FIG. 9decides the maximum number of reference pictures, without performing theoperation of subtracting 1 from the division result (Nspx/(h×w)).

Here, h designates the number of vertical pixels in a target picture tobe coded, w designates the number of horizontal pixels in the targetpicture, Nrpn designates the maximum number of reference pictures, Nspxdesignates the maximum number of storage pixels, and Ndwp designates thenumber of display wait pictures.

In this fourth embodiment, the control of the picture memory isperformed adaptively to the control of a picture memory in the decodingapparatus for deleting image data of pictures which are not employed asreference pictures from the picture memory immediately after the displayof the pictures is finished. However, the image data of pictures whichare not employed as reference pictures may be deleted at a time otherthan immediately after the display as described in the fourthembodiment.

For example, the control of the picture memory according to the fourthembodiment may be performed adaptively to the control of the picturememory in the decoding apparatus for deleting image data of a picturewhich is stored in the picture memory but is not used as a referencepicture, from the picture memory after the display time of one pictureexpires after the picture has been displayed.

Embodiment 5

FIG. 10 is a block diagram for explaining a moving picture decodingapparatus 50 a according to a fifth embodiment of the present invention.

The moving picture decoding apparatus 50 a according to the fifthembodiment receives a bit stream corresponding to plural pictures thatconstitute a moving picture, and decodes the bit stream in predetermineddata processing units, i.e., in units of blocks. More specifically, thismoving picture decoding apparatus 50 a decodes a bit stream Bsa (seeFIG. 14(a)) generated by the moving picture coding apparatus 10 aaccording to the first embodiment. Here, the block is a macroblock thatis composed of 16 vertical pixels×16 horizontal pixels.

That is, this moving picture decoding apparatus 50 a includes a bitstream analyzer 501 that analyzes an inputted bit stream Bsa, andoutputs various kinds of header information that is stored in a headerarea Ha of the bit stream Bsa, and data stored in a sequence data partDsq of the bit stream Bsa. Here, a level identifier H1 is included inthe header area Ha as one kind of header information. In addition, thesequence data part Dsq contains a sequence header Sh, and furthercontains information Ms of a coding mode, coded data Cd, information MVof a motion vector, and the like, corresponding to each macroblock.Further, information indicating the size of an input image that has beena target of the coding process on the coding end (input image sizeinformation) Ipx is included in the sequence header Sh. This input imagesize information Ipx is composed of information Ihpx indicating thenumber of vertical pixels (Nhpx) of the input image, and informationIwpx indicating the number of horizontal pixels (Nwpx) of the inputimage.

The moving picture decoding apparatus 50 a includes a predictionresidual decoder 502 that decompressively decodes coded data Cd from thebit stream analyzer 501, and outputs decoded residual data Dd of thetarget block; an adder 511 that adds the decoded residual data Dd of thetarget block and predictive data Pd for the target block, and outputsimage data of the target block (hereinafter, referred to as decodeddata) Rd; and a picture memory 503 that temporarily stores one of theoutput data Dd from the prediction residual decoder 502 and the outputdata Rd from the adder 511, and outputs the stored decoded data Ed asdata DRd of a picture that is to be referred to at the decoding of thetarget block in accordance with a picture designation signal DSpd. Here,in the picture memory 503, image data of decoded pictures which arearranged in the order of decoding are reordered in the order of display.The image data of the decoded pictures which have been reordered in theorder of display are outputted from the picture memory 503 in units ofpictures, as image data Od of the output image.

The moving picture decoding apparatus 50 a includes a motioncompensation decoder 504 that generates predictive data Pd for thetarget block on the basis of a motion vector MV from the bit streamanalyzer 501 and the output data (reference candidate picture data) DRdfrom the picture memory 503; and a motion vector storage unit 505 thatstores the motion vector MV of a block, which has been supplied to themotion compensation decoder 504.

The moving picture decoding apparatus 50 a includes a selector switch508 that selects one of the output data Dd from the prediction residualdecoder 502 and the output data Rd from the adder 511, and outputs theselected data as selection data Ed. Here, the selector switch 508 hastwo input terminals Tc1 and Tc2, and one output terminal Td. Inaccordance with a switch control signal, the output terminal Td isconnected to one of the two input terminals Tc1 and Tc2.

The moving picture decoding apparatus 50 a of the fifth embodimentincludes a level analyzer 509 a that outputs information indicating themaximum number of intra frame pixels which can be decoded (Nfpx) (i.e.,the maximum intra frame pixel number information) Ifpx, and informationindicating the number of pixels corresponding to the maximum image datawhich can be stored in the picture memory of the decoding apparatus (themaximum storage pixel number (Nspx)) (i.e., the maximum storage pixelnumber information) Ispx, in accordance with a level signal (levelidentifier) Lst indicating a coding level from the bit stream analyzer501. This level analyzer unit 509 includes information of the table T1shown in FIG. 15. The table T1 defines correspondence between the levelidentifier value, and the maximum intra frame pixel number and storagepixel maximum number.

The moving picture decoding apparatus 50 a includes a judgement unit(decoding capability judgment unit) 506 a that judges whether decodingof the inputted bit stream is possible or not, on the basis of themaximum intra frame pixel number information Ifpx that is outputted fromthe level analyzer 509 a and information indicating the number ofvertical pixels (h) and the number of horizontal pixels (w) of the inputimage (input image size information) Ipx, which is outputted from thebit stream analyzer 501, and outputs a signal indicating the judgementresult (judgement result signal) DSjd. The moving picture decodingapparatus 50 a further includes a calculator (maximum reference picturecalculator) 507 a that calculates the number of reference candidatepictures (reference picture maximum number) Nrpn which can be referredto at inter picture prediction decoding, on the basis of the maximumstorage pixel number information Ispx and the input image sizeinformation Ipx, and outputs information Irpn indicating the calculatednumber Nrpn (reference picture maximum number).

The moving picture decoding apparatus 50 a further includes a controlunit 510 that controls operations of the respective components of themoving picture decoding apparatus 50 a with control signals Dct1, Dct2,. . . , Dctn, on the basis of the judgement result signal DSjd and thecoding mode information Ms from the bit stream analyzer 501. Thiscontrol unit 510 controls the switch 508 with a predetermined controlsignal, according to the coding mode indicated by the mode signal Msfrom the bit stream analyzer 501. The control unit 510 further controlsoperations of the prediction residual decoder 502, the motioncompensation decoder 504, and the like with the control signals Dct1,Dct2, . . . , Dctn, on the basis of the judgement result signal DSjd.That is, when the judgement result signal DSjd indicates that decodingof the inputted bit stream Bsa is possible, the control unit 510controls the prediction residual decoder 502, the motion compensationdecoder 504, and the like, for executing the decoding of the inputtedbit stream Bsa. On the other hand, when the judgement result signal DSjdindicates that decoding of the inputted bit stream Bsa is impossible,the control unit 510 controls the prediction residual decoder 502, themotion compensation decoder 504, and the like, for not executing thedecoding of the inputted bit stream Bsa.

A specific construction of the decoding capability judgment unit 506 ain the moving picture decoding apparatus 50 a according to the fifthembodiment is the same as that of the coding capability judgment unit108 a in the moving picture coding apparatus 10 a according to the firstembodiment as shown in FIG. 2.

A specific construction of the maximum reference picture calculator 507a in the moving picture decoding apparatus 50 a according to the fifthembodiment is the same as that of the maximum reference picturecalculator 109 a in the moving picture coding apparatus 10 a accordingto the first embodiment as shown in FIG. 3.

Next, its operation will be described.

When the bit stream Bsa is inputted to the moving picture decodingapparatus 50 a, initially the bit stream analyzer 501 analyzes the bitstream Bsa to extract various kinds of information such as the codingmode information Ms, motion vector information MV, and coded data Cd,from the bit stream Bsa. At that time, the bit stream analyzer 501simultaneously extracts various kinds of header information included inthe header area Ha of the bit stream Bsa, and outputs the headerinformation to the level analyzer 509 a, the decoding capabilityjudgment unit 506, and the maximum reference picture calculator 507 a.

The level analyzer 509 a decides the maximum number of intra framepixels (Nfpx) and the maximum number of storage pixels (Nspx) withreferring to the table T1 (FIG. 15) that is retained therein, inaccordance with the level signal Lst corresponding to one kind of headerinformation H1 included in the header area Ha, and outputs maximum intraframe pixel number information Ifpx and storage pixel maximum numberinformation Ispx. The maximum intra frame pixel number information Ifpxis inputted to the decoding capability judgment unit 506 a, and themaximum storage pixel number information Ispx is inputted to the maximumreference picture calculator 507 a.

Then, the decoding capability judgment unit 506 a judges whetherdecoding for the inputted bit stream Bsa is possible or not, on thebasis of the maximum intra frame pixel number information Ifpx from thelevel analyzer 509 a, and the input image size information Ipx (inputimage vertical pixel number information Ihpx and horizontal pixel numberinformation Iwpx) that has been extracted from the sequence header Sh ofthe bit stream Bsa by the bit stream analyzer 501, and outputs a signalindicating the result of judgement (judgement result signal) DSjd to thecontrol unit 510.

When the judgement result signal DSjd indicates that the decoding of theinputted bit stream Bsa is possible, the control unit 510 controls therespective components of the moving picture decoding apparatus 50 a inaccordance with the control signals Dct1, Dct2, . . . , Dctn, forexecuting the decoding of the inputted bit stream Bsa, while when thejudgement result signal DSjd indicates that the decoding of the inputtedbit stream Bsa is impossible, the control unit controls the respectivecomponents of the moving picture decoding apparatus 50 a in accordancewith the control signals Dct1, Dct2, . . . , Dctn, for not executing thedecoding of the inputted bit stream Bsa.

When the judgement result signal DSjd indicates that the decoding of theinputted bit stream Bsa is possible, the control unit 510 performsswitching between a mode of performing inter picture prediction decodingfor the bit stream Bsa and a mode of performing intra picture predictiondecoding for the bit stream Bsa according to the coding mode indicatedby the mode signal Ms from the bit stream analyzer 501.

Then, when the mode of performing the inter picture prediction decodingis selected by the control unit 510, the switch 508 is controlled by apredetermined control signal from the control unit 510, so that theoutput terminal Td is connected to the second input terminal Tc2. On theother hand, when the mode of performing the intra picture predictiondecoding is selected by the control unit 510, the switch 508 iscontrolled by a predetermined control signal from the control unit 510,so that the output terminal Td is connected to the first input terminalTc1.

Further, the maximum reference picture calculator 507 a calculates thenumber of reference candidate pictures which can be referred to at theinter picture prediction decoding (reference picture maximum number)Nrpn on the basis of the maximum storage pixel number information Ispx,and the vertical pixel number information Ihpx and horizontal pixelnumber information Iwpx of the input image, and outputs informationindicating the calculated number Nrpn (reference picture maximum numberinformation) Irpn to the motion compensation decoder 504.

Hereinafter, the operation in the case where the inter pictureprediction decoding mode is selected will be initially described.

When the motion vector information MV that has been extracted from thebit stream Bsa by the bit stream analyzer 501 is inputted to the motioncompensation decoder 504, the motion compensation decoder 504 performsmotion compensation for the target macroblock on the basis of thereference picture maximum number information Irpn from the maximumreference picture calculator 507 a, and the motion vectors MV of decodedmacroblocks and the motion vector MV of the target macroblock which arestored in the motion vector storage unit 505, with referring to apredetermined reference picture, and outputs predictive data Pdcorresponding to the target block, to the adder 511. At this time,decoded image data Ed corresponding to the decoded pictures are storedin the picture memory 503, as image data of reference candidatepictures, and a required picture among the reference candidate picturesis specified in the picture memory 503 as the reference picture inaccordance with a picture designation signal DSpd from the motioncompensation decoder 504.

Coded data Cd that has been extracted from the bit stream Bsa by the bitstream analyzer 501 is decoded by the prediction residual decoder 502,and prediction residual image data Dd that has been obtained by thedecoding is outputted to the adder 511.

The adder 511 performs addition between the prediction residual imagedata Dd from the prediction residual decoder 502 and the predictive dataPd from the motion compensation decoder 504, and outputs image data Rdthat is obtained by the addition to the picture memory 503 via theswitch 508. Then, the image data Rd of the target picture to be decodedis written to the picture memory 503 as decoded data in units ofmacroblocks.

Then, image data of decoded pictures which are arranged in the order ofdecoding are reordered in the order of display, and outputted from thepicture memory 503 as image data Od of an output image in units ofpictures.

Next, the operation in the case where the intra picture predictiondecoding mode is selected will be briefly described.

In this case, the coded data Cd extracted from the bit stream Bsa by thebit stream analyzer 501 are decoded by the prediction residual decoder502, and prediction residual image data Dd obtained by the decoding isstored in the picture memory 503 as it is as decoded data Rd via theswitch 508.

Next, specific operations of the decoding capability judgment unit 506 aand the maximum reference picture calculator 507 a in the moving picturedecoding apparatus 50 a will be briefly described.

The decoding capability judgment unit 506 a of the moving picturedecoding apparatus 50 a according to the fifth embodiment judges whetherthe decoding of the inputted bit stream is possible or not, according tothe above-mentioned conditional formulae (formula 1), (formula 2a),(formula 2b), (formula 3a), and (formula 3b), like the coding capabilityjudgment unit 108 a of the moving picture coding apparatus 10 aaccording to the first embodiment.

More specifically, the decoding capability judgment unit 506 a performsthe operation indicated by (formula 1) on the basis of the input imagevertical pixel number information Ihpx and horizontal pixel numberinformation Iwpx included in the input image size information Ipx thathas been outputted from the bit stream analyzer 501. In other words, themultiplication for obtaining the product (h×w) of the number of verticalpixels (h) and the number of horizontal pixels (w) in the input image isperformed, and then comparison between the multiplication result (h×w)and the maximum intra frame pixel number (Nfpx) (i.e., intra frame pixelnumber comparison) is performed. Next, the decoding capability judgmentunit 506 a calculates the maximum number of vertical pixels (H) and themaximum number of horizontal pixels (W) as indicated by the (formula 3a)and (formula 3b), respectively, on the basis of the input image verticalpixel number information Ihpx and horizontal pixel number informationIwps.

Here, the (formula 3a) and (formula 3b) indicate that the maximumvertical pixel number (H) and the maximum horizontal pixel number (W)are respectively the positive square root of a value that is obtained bymultiplying the product of the vertical pixel number (h) and thehorizontal pixel number (w) of the input image, by N. For example whenN=8, the (formula 3a) suggests that the maximum number of verticalpixels are decided so that the ratio between the number of verticalpixels and the number of horizontal pixels is smaller than 8:1, and the(formula 3b) suggests that the maximum number of horizontal pixels aredecided so that the ratio between the number of vertical pixels and thenumber of horizontal pixels is smaller than 1:8.

The decoding capability judgment unit 506 a further performs anoperation such as omission, raising, or half-adjust, for the maximumnumber of vertical pixels (H) and the maximum number of horizontalpixels (W) to be rounded to a multiple of 16, respectively, and thenperforms comparison between the input image vertical pixel number (h)and the rounded maximum number of vertical pixels (H) (vertical pixelnumber comparison), and comparison between the input image horizontalpixel number (w) and the rounded maximum number of horizontal pixels (W)(horizontal pixel number comparison).

Then, on the basis of the results of the intra frame pixel numbercomparison, the vertical pixel number comparison, and the horizontalpixel number comparison, the final judgement as to thecapability/incapability of decoding is performed.

The maximum reference picture calculator 507 a of the moving picturecoding apparatus 50 a according to the fifth embodiment calculates themaximum number of reference candidate pictures which are employed at theinter picture prediction decoding, according to the operation indicatedby the (formula 4).

The maximum reference picture calculator 507 a calculates the totalnumber of pixels in one frame (h×w) as the size of the input image, onthe basis of the vertical pixel number information Ihpx and thehorizontal pixel number information Iwpx for the input image from thebit streams analyzer 501.

Further, the maximum reference picture calculator 507 a performs anoperation of dividing the maximum storage pixel number (Nspx) by themultiplication result (h×w), and further performs an operation ofsubtracting 1 from the division result (Nspx/(h×w)), thereby obtainingthe subtraction result (Nspx/(h×w)−1) as the maximum number of referencepictures.

As described above, the moving picture decoding apparatus 50 a of thefifth embodiment includes the level analyzer 509 a that decides themaximum number of intra frame pixels (Nfpx) which can be decoded and themaximum number of storage pixels (Nspx) which can be stored in thepicture memory 503 in accordance with the level signal Lst indicatingthe level identifier, which has been extracted from the bit stream Bsaby the bit stream analyzer 501, thereby judging whether decoding of theinputted bit stream Bsa is possible or not on the basis of the maximumintra frame pixel number (Nfpx) and the input image size (vertical pixelnumber Nfpx and horizontal pixel number Nwpx), and calculating thenumber of reference candidate pictures which can be referred to at theinter picture prediction decoding (reference picture maximum number)Nrpn. Therefore, a bit stream which can be decoded by the moving picturedecoding apparatus among bit streams which have been supplied from thecoding end can be determined by the level identifier, therebysatisfactorily performing picture prediction decoding corresponding tothe picture prediction coding on the coding end. Thereby, it is possibleto design a memory area in the decoding apparatus corresponding to thecoding method in which there is no restraint on the capacity of thememory area.

In this fifth embodiment, the table T1 in which pairs of the maximumintra frame pixel number and the maximum storage pixel number arecorrelated with the coding levels (values of the level identifier) (seeFIG. 15) is employed as a table that defines correspondence between thecoding level, and the maximum intra frame pixel number and storage pixelmaximum number. However, a table T1 a that defines correspondencebetween the value of the level identifier and the maximum intra framepixel number (FIG. 16(a)) and a table T1 b that defines correspondencebetween the value of the level identifier and the maximum storage pixelnumber (FIG. 16(b)) may be employed in place of the table T1.

Embodiment 6

FIG. 11 is a block diagram for explaining a moving picture decodingapparatus 50 b according to a sixth embodiment of the present invention.

This moving picture decoding apparatus 50 b according to the sixthembodiment receives a bit stream corresponding to plural pictures thatconstitute a moving picture, and decodes the bit stream in predetermineddata processing units, i.e., in units of blocks. More specifically, themoving picture decoding apparatus 50 b decodes a bit stream Bsb that isgenerated by the moving picture coding apparatus 10 b according to thesecond embodiment (see FIG. 14(b)). Therefore, in this sixth embodiment,the bit stream analyzer 501 analyzes header information H1 and H2 toextract a level identifier Lst and an identification number signal Cid,and analyzes a sequence data part Dsq to extract information Ms of acoding mode, coded data Cd, motion vector information Mb, input imagesize information Ipx and the like, corresponding to each macroblock.

Further, the level analyzer 509 b in the moving picture decodingapparatus 50 b according to the sixth embodiment contains the tables T1and T2, and outputs maximum intra frame pixel number information Ifpxand storage pixel maximum number information Ispx on the basis of thelevel signal Lst from the bit stream analyzer 501, as well as outputspixel number calculation coefficient information αpx on the basis of theidentification number signal Cid from the bit stream analyzer 501. Adecoding capability judgment unit 506 b according to the sixthembodiment judges whether decoding of an inputted bit stream Bsb ispossible or not on the basis of the maximum intra frame pixel numberinformation Ifpx and the pixel number calculation coefficientinformation a px from the level analyzer 509 b, and the input image sizeinformation Ipx from the bit stream analyzer 501. Here, the pixel numbercalculation coefficient information αpx is composed of information αhpxindicating a vertical pixel number calculation coefficient (N αhxp), andinformation αwpx indicating a horizontal pixel number calculationcoefficient (Nαwpx).

Constructions of the other components of the moving picture decodingapparatus 50 b according to the sixth embodiment are the same as thoseof the moving picture decoding apparatus 50 a according to the fifthembodiment.

A specific construction of the decoding capability judgment unit 506 bin the moving picture decoding apparatus 50 b according to the sixthembodiment is identical to that of the coding capability judgment unit108 b in the moving picture coding apparatus 100 b according to thesecond embodiment as shown in FIG. 5.

Next, the operation will be described.

The operation of the moving picture decoding apparatus 50 b according tothe sixth embodiment is different from the operation of the movingpicture decoding apparatus 50 a according to the fifth embodiment onlyin the operations of the bit stream analyzer 501, the decodingcapability judgment unit 506 b, and the level analyzer 509 b.

Then, the operations of the bit stream analyzer 501, the decodingcapability judgment unit 506 b, and the level analyzer 509 b will bemainly described hereinafter.

When the bit stream Bsb is inputted to the moving picture decodingapparatus sob, the bit stream analyzer 501 analyzes the bit stream Bsb,and extracts various kinds of information such as coding modeinformation Ms, motion vector information MV, and coded data Cd from thebit stream Bsb. At that time, various kinds of header informationincluded in the header area Hb of the bit stream Bsb is simultaneouslyextracted, and inputted to the level analyzer 509 b, the decodingcapability judgment unit 506 b, and the maximum reference picturecalculator 507 a.

The level analyzer 509 b outputs maximum intra frame pixel numberinformation Ifpx and storage pixel maximum number information Ispx inaccordance with a level identifier (level signal) Lst corresponding tothe header information (code) H1 in the header area Hb, with referringto the table T1 (FIG. 15) that is held therein. The level analyzer 509 boutputs pixel number calculation coefficient information αpx (verticalpixel number calculation coefficient information a hpx and horizontalpixel number calculation coefficient information αwpx) in accordancewith the identification number signal Cid corresponding to the headerinformation (code) H2 in the header area Hb, with referring to the tableT2 (FIG. 17(a)) that is held therein. The maximum intra frame pixelnumber information Ifpx and the pixel number calculation coefficientinformation a px is inputted to the decoding capability judgment unit506 b, while the maximum storage pixel number information Ispx isinputted to the maximum reference picture calculator 507 a.

Then, the decoding capability judgment unit 506 b judges whetherdecoding of the inputted bit stream Bsb is possible or not, on the basisof the maximum intra frame pixel number information Ifpx and the pixelnumber calculation coefficient information αpx (vertical pixel numbercalculation coefficient information αhpx and horizontal pixel numbercalculation coefficient information αwpx) from the level analyzer 509 b,and the input image size information Ipx (input image vertical pixelnumber information Ihpx and input image horizontal pixel numberinformation Iwpx) extracted from the sequence header Sh by the bitstream analyzer 501, and outputs a signal indicating the judgementresult (judgement result signal) DSjd to the control unit 510.

In this sixth embodiment, the decoding for the inputted bit stream Bsbis performed in accordance with the judgement result signal DSjd, in thesame manner as the moving picture decoding apparatus 50 a according tothe fifth embodiment.

Next, a specific operation of the decoding capability judgment unit 506b in the moving picture decoding apparatus 50 b will be brieflydescribed.

The decoding capability judgment unit 506 b of the moving picturedecoding apparatus 50 b according to the sixth embodiment judges thecapability or incapability of the decoding for the inputted bit streamBsb according to the above-mentioned conditional formulas (formula 1),(formula 2a), (formula 2b), (formula 8a), and (formula 8b).

Initially, the decoding capability judgment unit 506 b performs theoperation indicated by the (formula 1) on the basis of the input imagesize information Ipx (vertical pixel number information Ihpx andhorizontal pixel number information Iwpx of the input image) that isoutputted from the bit stream analyzer 501, like in the decodingcapability judgment unit 506 a according to the fifth embodiment. Inother words, multiplication for obtaining the product (h×w) of thenumber of vertical pixels (h) and the number of horizontal pixels (w) inthe input image is performed, and then comparison between themultiplication result (h×w) and the maximum intra frame pixel number(Nfpx) (i.e., intra frame pixel number comparison) is performed.

Next, the decoding capability judgment unit 506 b calculates the maximumnumber of vertical pixels (H) and the maximum number of horizontalpixels (w) as indicated by the (formula 8a) and (formula 8b), on thebasis of the intra frame pixel number information Ifpx and the pixelcalculation coefficient information a px (vertical pixel numbercalculation coefficient information a hpx and horizontal pixelcalculation coefficient information αwpx).

Here, the (formula 8a) and (formula 8b) indicate that the maximum numberof vertical pixels (H) and the maximum number of horizontal pixels (W)are obtained by dividing the maximum number of intra frame pixels (Nfpx)by the vertical pixel number calculation coefficient (Nαhpx) and thehorizontal pixel number calculation coefficient (Nαwpx), respectively.

Further, the decoding capability judgment unit 506 b rounds the maximumvertical pixel number (H) and the maximum horizontal pixel number (W) toa multiple of 16, respectively, by an operation such as omission,raising, or half-adjust, and performs comparison between the input imagevertical pixel number (h) and the rounded vertical pixel maximum number(H) (i.e., vertical pixel number comparison), and comparison between theinput image horizontal pixel number (w) and the rounded horizontal pixelmaximum number (W) (i.e., horizontal pixel number comparison).

Then, the final judgement as to the capability or incapability of thedecoding is performed on the basis of the results of the intra framepixel number comparison, the vertical pixel number comparison, and thehorizontal pixel number comparison.

As described above, the moving picture decoding apparatus 50 b accordingto the sixth embodiment includes the level analyzer unit 509 b thatdecides the maximum number of intra frame pixels (Nfpx) which can bedecoded and the maximum number of storage pixels (Nspx) which can bestored in the picture memory 503, as well as the pixel numbercalculation coefficient (Nαpx), on the basis of level identifier (levelsignal) Lst and the identification number signal Cid, which areextracted from the bit stream Bsb by the bit stream analyzer 501,thereby judging whether decoding of the inputted bit stream Bsb ispossible or not on the basis of the maximum intra frame pixel number(Nfpx) and the pixel number calculation coefficient (Nαpx) which aredecided by the level analyzer 509 b, and the input image sizeinformation Ipx included in the bit stream Bsb, and calculating thenumber of reference candidate pictures (reference picture maximumnumber) Nrpn which can be referred to at the inter picture predictiondecoding. Therefore, a bit stream which can be decoded by the movingpicture decoding apparatus among bit streams which have been suppliedfrom the coding end is determined on the basis of the level identifier,whereby picture prediction decoding corresponding the picture predictioncoding on the coding end can be satisfactorily performed. Accordingly, amemory area of the decoding apparatus that is adapted to the codingmethod in which there is no restraint on the capacity of the memory areacan be designed.

In this sixth embodiment, the maximum number of vertical pixels (H) andthe maximum number of horizontal pixels (W) are obtained by dividing themaximum intra frame pixel number (Nfpx) by the vertical pixel numbercalculation coefficient (Nαhpx) and the horizontal pixel numbercalculation coefficient (Nαwpx), respectively, whereby the process forobtaining the maximum number of vertical pixels (H) and the maximumnumber of horizontal pixels (W) can be facilitated as compared to thefifth embodiment.

Here, in the sixth embodiment, the level identifier corresponding to themaximum intra frame pixel number (Nfpx) and the maximum storage pixelnumber (Nspx), and the identification number corresponding to thevertical pixel number calculation coefficient (Nαhpx) and the horizontalpixel number calculation coefficient (Nαwpx) are parameters thatindicate independent coding conditions, respectively. However, the valueof the identification number may be correlated with the value of thelevel identifier.

In this case, specific values of the vertical pixel number calculationcoefficient (Nαhpx) and the horizontal pixel number calculationcoefficient (Nαwpx) are decided together with specific values of themaximum intra frame pixel number (Nfpx) and the maximum storage pixelnumber (Nspx) on the basis of the level signal Lst indicating the levelidentifier, with referring to the tables T1 and T2. That is, when thelevel signal Lst from the bit stream analyzer 501 is inputted to thelevel analyzer 509 b, the level analyzer 509 b outputs information Ifpxand Ispx indicating the maximum intra frame pixel number (Nfpx) and themaximum storage pixel number (Nspx), respectively, with reference to thetable T1 on the basis of the level signal Lst, and further outputs pixelnumber calculation coefficient information αpx on the basis of theidentification number corresponding to the level identifier, withreference to the table T2. In this case, the bit stream Bsb includesonly the code H1 corresponding to the level signal Lst, and thus theidentification number signal Cid corresponding to the code H2 is notoutputted from the bit stream analyzer 501 to the level analyzer 509 b.

According to this sixth embodiment, the moving picture decodingapparatus analyzes the code H1 of the level identifier corresponding tothe maximum intra frame pixel number (Nfpx) and the maximum storagepixel number (Nspx), and the code H2 of the identification numbercorresponding to the vertical pixel number calculation coefficient(Nαhpx) and the horizontal pixel number calculation coefficient (Nαwpx),then obtains the maximum intra frame pixel number (Nfpx) and the maximumstorage pixel number (Nspx) with reference to the table T1 on the basisof the level identifier obtained by the analysis of the code H1, andfurther obtains the vertical pixel number calculation coefficient(Nαhpx) and the horizontal pixel number calculation coefficient (Nαwpx)with reference to the table T2 on the basis of the identification numbersignal Cid obtained by the analysis of the code H2. However, the movingpicture decoding apparatus may analyze a code that is obtained by codingpixel number calculation coefficient information a px indicatingarbitrary vertical pixel number calculation coefficient (Nαhpx) andhorizontal pixel number calculation coefficient (Nαwpx), which aredecided by the user, and directly obtain the pixel number calculationcoefficient information a px by the analysis of the code.

In this case, the decision of specific values for the maximum intraframe pixel number (Nfpx) and the maximum storage pixel number (Nspx) isperformed with reference to the table T1, while the decision of specificvalues for the vertical pixel number calculation coefficient (Nαhpx) andthe horizontal pixel number calculation coefficient (Nαwpx) is performedby the analysis of the code corresponding to the pixel numbercalculation coefficient information αpx, without referring to the table.

That is, when the level signal Lst from the bit stream analyzer 501 isinputted to the level analyzer 509 b, the level analyzer 509 b outputsinformation Ifpx indicating the maximum intra frame pixel number (Nfpx)decided with reference to the table T1, to the decoding capabilityjudgment unit 506 b, and outputs information Ispx indicating the maximumstorage pixel number (Nspx) decided with reference to the table T1, tothe maximum reference picture calculator 507 a, in accordance with thelevel signal Lst. Further, the pixel number calculation coefficientinformation αpx indicating specific values of the vertical pixel numbercalculation coefficient (Nαhpx) and the horizontal pixel numbercalculation coefficient (Nαwpx), which are obtained by the analysis ofthe code by the bit stream analyzer 501 is directly inputted to thedecoding capability judgment unit 506 b.

Embodiment 7

FIG. 12 is a block diagram for explaining a moving picture decodingapparatus 50 c according to a seventh embodiment of the presentinvention.

The moving picture decoding apparatus 50 c according to the seventhembodiment receives a bit stream corresponding to plural pictures thatconstitute a moving picture, and decodes the bit stream in predetermineddata processing units, i.e., in units of blocks. More specifically, thismoving picture decoding apparatus 50 c decodes a bit stream Bsc (FIG.14(c)) that is generated by the moving picture coding apparatus 10 caccording to the third embodiment. Therefore, the bit stream analyzer501 according to the seventh embodiment analyzes header information H1and H3, to extract the level identifier Lst and the identificationnumber signal Sid, and analyzes data in the sequence data part Dsq, toextract information corresponding each macroblock such as coding modeinformation Ms, coded data Cd, motion vector information MV, and inputimage size information Ipx.

The level analyzer 509 c of the moving picture decoding apparatus 50 caccording to the seventh embodiment has the tables T1 and T3, andoutputs maximum intra frame pixel number information Ifpx and storagepixel maximum number information Ispx on the basis of the level signalLst outputted from the bit stream analyzer 501, as well as outputsmaximum image size information Impx on the basis of the identificationnumber signal Sid outputted from the bit stream analyzer 501. Further,the decoding capability judgment unit 506 c according to the seventhembodiment judges whether decoding of the inputted bit stream Bsc ispossible or not on the basis of the maximum intra frame pixel numberinformation Ifpx and the maximum image size information Impx from thelevel analyzer 509 c, and the input image size information Ipx from thebit stream analyzer 501. Here, the maximum image size information Impxis composed of information Imhpx indicating the maximum number ofvertical pixels (H) and information Imwpx indicating the maximum numberof horizontal pixels (W).

Constructions of the other components in the moving picture decodingapparatus 50 c according to the seventh embodiment are the same as thosein the moving picture decoding apparatus 50 a according to the fifthembodiment.

Further, a specific construction of the decoding capability judgmentunit 506 c in the moving picture decoding apparatus 50 c according tothe seventh embodiment is identical to that of the coding capabilityjudgment unit 108 c in the moving picture coding apparatus 10 caccording to the third embodiment as shown in FIG. 7.

Next, the operation will be described.

When the bit stream Bsc is inputted to the moving picture decodingapparatus 50 c, the bit stream analyzer 501 initially analyzes the bitstream Bsc, and extracts various kinds of information such as codingmode information Ms, motion vector information MV, and coded data Cd,from the bit stream Bsc. At that time, various kinds of headerinformation included in the header area Hc of the bit stream Bsc aresimultaneously extracted, and outputted to the level analyzer 509 c, thedecoding capability judgment unit 506 c, and the maximum referencepicture calculator 507 a.

The level analyzer 509 c refers to the table T1 (FIG. 15) that is heldtherein, and outputs maximum intra frame pixel number information Ifpxand storage pixel maximum number information Ispx in accordance with thelevel signal (level identifier signal) Lst corresponding to headerinformation (code) H1 in the header area Hc. Further, the level analyzer509 c refers to the table T3 (FIG. 18(a)) that is held therein, andoutputs maximum image size information Impx (vertical pixel maximumnumber information Imhpx and horizontal pixel maximum number informationImwpx) in accordance with an identification number signal Sidcorresponding to header information (a code) H3 in the header area Hc.The maximum intra frame pixel number information Ifpx and the maximumimage size information Impx is inputted to the decoding capabilityjudgment unit 506 c, while the maximum storage pixel number informationIspx is inputted to the maximum reference picture calculator 507 a.

Then, the decoding capability judgment unit 506 c judges whetherdecoding of the inputted bit stream Bsc is possible or not, on the basisof the maximum intra frame pixel number information Ifpx and the maximumimage size information Impx (vertical pixel maximum number informationImhpx and horizontal pixel maximum number information Imwpx) from thelevel analyzer 509 c, and the input image size information Ipx (inputimage vertical pixel number information Ihpx and input image horizontalpixel number information Iwpx) that has been extracted from the sequenceheader by the bit stream analyzer 501, and outputs a signal indicatingthe judgement result (judgement result signal) Dsjd to the control unit510.

In this seventh embodiment, the decoding for the bit stream Bsc isperformed in accordance with the judgement result signal DSjd in thesame manner as the moving picture decoding apparatus 50 a of the fifthembodiment.

Next, a specific operation of the decoding capability judgment unit 506c in the moving picture decoding apparatus 50 c will be brieflydescribed.

In the decoding capability judgment unit 506 c in the moving picturedecoding apparatus 50 a according to the seventh embodiment, it isjudged whether the decoding for the inputted bit stream Bsc is possibleor not, according to the conditional formulas (formula 1), (formula 2a),and (formula 2b).

Initially, the decoding capability judgment unit 506 c performs theoperation indicated by the (formula 1) on the basis of the input imagesize information Ipx (vertical pixel number information Ihpx andhorizontal pixel number information Iwpx) that is outputted from the bitstream analyzer 501, in the same manner as the decoding capabilityjudgment unit 506 a according to the fifth embodiment. That is,multiplication for obtaining the product (h×w) of the number of verticalpixels (h) and the number of horizontal pixels (w) in the input image isperformed, and comparison between the multiplication result (h×w) andthe maximum number of intra frame pixels (Nfpx) (i.e., intra frame pixelnumber comparison) is performed.

Then, on the basis of the maximum image size information Impx (verticalpixel maximum number information Imhpx and horizontal pixel maximumnumber information Imwpx), the decoding capability judgment unit 506 cperforms comparison between the input image vertical pixel number (h)and the maximum vertical pixel number (H) indicated by the maximumvertical pixel number information Imhpx (i.e., vertical pixel numbercomparison), and comparison between the input image horizontal pixelnumber (w) and the maximum horizontal pixel number (W) indicated by themaximum horizontal pixel number information Imwpx (i.e., horizontalpixel number comparison).

Then, the final judgement as to the capability or incapability ofdecoding is performed on the basis of the results of the intra framepixel number comparison, the vertical pixel number comparison, and thehorizontal pixel number comparison.

As described above, the moving picture decoding apparatus 50 c accordingto the seventh embodiment includes the level analyzer 509 c that decidesthe maximum number of intra frame pixels (Nfpx) which can be decoded andthe maximum number of storage pixels (Nspx) which can be stored in thepicture memory 503 and decides the maximum image size (Nmpx) as well asdecides the maximum image size (Nmpx) on the basis of the levelidentifier (level signal) Lst and the identification number signal Sid,which are extracted from the bit stream Bsc by the bit stream analyzer501, thereby judging whether the decoding for the inputted bit streamBsc is possible or not on the basis of the maximum intra frame pixelnumber (Nfpx) and the maximum image size (Nmpx) which are decided by thelevel analyzer 509 c, and the input image size information Ipx includedin the bit stream Bsc, and calculating the number of reference candidatepictures which can be referred to at the inter picture predictiondecoding (reference picture maximum number) Nrpn. Therefore, bit streamswhich can be decoded by the moving picture decoding apparatus among bitstreams which have been supplied from the coding end can be determinedon the basis of the level identifier, whereby picture predictiondecoding corresponding to the picture prediction coding on the codingend can be satisfactorily performed. Accordingly, a memory area of adecoding apparatus that is adapted to the coding method in which thereis no restraint on the capacity of the memory area can be designed.

In this seventh embodiment, the maximum number of vertical pixels (H)and the maximum number of horizontal pixels (W) are obtained on thebasis of the maximum image size information Impx included in the bitstream Bsc. Therefore, the process for obtaining the maximum number ofvertical pixels (H) and the maximum number of horizontal pixels (W) isfacilitated as compared to the fifth embodiment.

In this seventh embodiment, the level identifier corresponding to themaximum intra frame pixel number (Nfpx) and the maximum storage pixelnumber (Nspx), and the identification number corresponding to themaximum number of vertical pixels (H) and the maximum number ofhorizontal pixels (W) are parameters that indicate independent codingconditions, respectively. However, values of the identification numbercan be correlated with values of the level identifier.

In this case, specific values of the maximum number of vertical pixels(H) and the maximum number of horizontal pixels (W) are decided togetherwith specific values of the maximum number of intra frame pixels (Nfpx)and the maximum number of storage pixels (Nspx) in accordance with thelevel signal Lst indicating the level identifier with reference to thetables T1 and T3. That is, when the level signal Lst from the bit streamanalyzer 501 is inputted to the level analyzer 509 c, the level analyzer509 c outputs information Ifpx and Ispx indicating the intra framemaximum number (Nfpx) and the maximum storage pixel number (Nspx),respectively, with reference to the table T1 on the basis of the levelsignal Lst, and further outputs the maximum image size information Impxwith reference to the table T3 on the basis of the identification numbercorresponding to the level identifier. In this case, the bit stream Bscincludes only the code Hc corresponding to the level signal Lst, andthus the identification number signal Sid corresponding to the code H3is not outputted from the bit stream analyzer 501 to the level analyzer509 c.

Further, in the seventh embodiment, the moving picture decodingapparatus analyzes the code H1 of the level identifier corresponding tothe maximum intra frame pixel number (Nfpx) and the maximum storagepixel number (Nspx), and the code H3 of the identification numbercorresponding to the maximum number of vertical pixels (H) and themaximum number of horizontal pixels (W), then obtains the inter-framepixel maximum number (Nfpx) and the maximum storage pixel number (Nspx)from the table T1 on the basis of the level identifier obtained by theanalysis of the code H1, and obtains the maximum number of verticalpixels (H) and the maximum number of horizontal pixels (W) from thetable T3 on the basis of the identification number signal Sid obtainedby the analysis of the code H3. However, the moving picture decodingapparatus may analyze a code that is obtained by coding the maximumimage size information Impx indicating arbitrary vertical pixel maximumnumber (H) and horizontal pixel maximum number (W) which are decided bythe user, and obtain the maximum image size information Impx directly bythe analysis of the code.

In this case, decision of specific values of the intra frame maximumpixel number (Nfpx) and the maximum storage pixel number (Nspx) isperformed on the basis of the table T1, while decision of specificvalues of the maximum vertical pixel number (H) and horizontal pixelmaximum number (W) is performed by the analysis of the codecorresponding to the maximum image size information Impx, without usingany table.

In other words, when the level signal Lst from the bit stream analyzer501 is inputted to the level analyzer 509 c, the level analyzer 509 coutputs information Ifpx indicating the maximum intra frame pixel number(Nfpx), which is decided on the basis of the table T1, to the decodingcapability judgment unit 506 c, and outputs information Ispx indicatingthe maximum storage pixel number (Nspx), which is decided on the basisof the table T1, to the maximum reference picture calculator 507 a, inaccordance with the level signal Lst. Further, the maximum image sizeinformation Impx indicating specific values of the maximum verticalpixel number (H) and the maximum horizontal pixel number (w), which isobtained by the analysis of the code in the bit stream analyzer 501 isdirectly inputted to the decoding capability judgment unit 506 c.

Embodiment 8

FIG. 13 is a block diagram for explaining a moving picture decodingapparatus 50 d according to an eighth embodiment of the presentinvention.

The moving picture decoding apparatus 50 d of the eighth embodimentreceives a bit stream corresponding to plural pictures that constitute amoving picture, and decodes the bit stream in predetermined dataprocessing units, i.e., in units of blocks. More specifically, themoving picture decoding apparatus 50 d decodes a bit stream Bsa (FIG.14(a)) which is generated by the moving picture coding apparatus 10 daccording to the fourth embodiment. However, the bit stream generated bythe moving picture coding apparatus 10 d of the fourth embodiment hasthe same data structure as that of the bit stream generated by themoving picture coding apparatus 10 a of the first embodiment, andaccordingly the moving picture decoding apparatus 50 d can also decodethe bit stream generated by the moving picture coding apparatus 10 a ofthe first embodiment.

That is, the moving picture decoding apparatus 50 d according to theeighth embodiment has, in place of the maximum reference picturecalculator 507 a in the moving picture decoding apparatus 50 a accordingto the fifth embodiment, a maximum reference picture calculator 507 dthat calculates the maximum number of reference pictures (Nrpn) on thebasis of input image size information Ipx (input image vertical pixelnumber information Ihpx and input image horizontal pixel numberinformation Iwpx), maximum storage pixel number information Ispx,display wait picture number information Idwp, and outputs informationindicating the calculated value (Nrpn) (i.e., reference picture maximumnumber information) Irpn.

Here, the display wait picture number information Idwp is informationthat indicates the number of display wait pictures, and the display waitpicture are decoded pictures which are not employed as referencepictures but whose image data are kept stored in a picture memory of thedecoding apparatus until display of these pictures is performed, asdescribed with reference to FIG. 26. Further, the control of the picturememory according to the eighth embodiment is performed so that imagedata of a picture that is not employed as the reference picture isdeleted from the picture memory immediately after the display of thepicture is finished.

Constructions of the other components in the moving picture decodingapparatus 50 d according to the eighth embodiment are the same as thosein the moving picture decoding apparatus 50 a according to the fifthembodiment.

A specific construction of the maximum reference picture calculator 507d in the moving picture decoding apparatus 50 d according to the eighthembodiment is identical to that of the maximum reference picturecalculator 109 d in the moving picture coding apparatus 10 d accordingto the fourth embodiment, as shown in FIG. 9.

Next, its operation will be described.

The operation of the moving picture decoding apparatus 50 d according tothe eighth embodiment is different from the operation of the movingpicture decoding apparatus 50 a according to the fifth embodiment onlyin the operation of the maximum reference picture calculator 507 d.

Hereinafter, only the operation of the maximum reference picturecalculator 507 d will be described.

The maximum reference picture calculator 507 d of the moving picturedecoding apparatus 50 d according to the eighth embodiment calculatesthe maximum number of reference candidate pictures which are employed atthe inter picture prediction decoding, according to the operationindicated by the (formula 11).

That is, in the maximum reference picture calculator 507 d, the totalnumber of pixels in one frame (h×w) as the size of the input image iscalculated on the basis of the input image vertical pixel numberinformation Ihpx and the input image horizontal pixel number informationIwpx.

Next, an operation of dividing the maximum storage pixel number (Nspx)by the multiplication result (h×w) is performed, and an operation ofsubtracting 1 from the division result (Nspx/(h×w)) is performed.

Then, the reference picture maximum number is decided by subtracting thenumber of display wait pictures (Ndwp) from the subtraction result(Nspx/(h×w)-1).

As described above, the moving picture decoding apparatus 50 d accordingto the eighth embodiment includes the level analyzer 509 a that decidesthe maximum number of intra frame pixels which can be decoded (Nfpx),and the maximum number of storage pixels which can be stored in thepicture memory 503 (Nspx), on the basis of the level identifierindicated by the level signal Lst which is extracted from the bit streamBsa by the bit stream analyzer 501, thereby performing judgement as tothe capability or incapability of decoding for the inputted bit streamBsa on the basis of the maximum intra frame pixel number (Nfpx) and theinput image size (the number of vertical pixels Nhpx and the number ofhorizontal pixels Nwpx), as well as calculating the number of referencecandidate pictures which can be referred to at the inter pictureprediction decoding (reference picture maximum number) Nrpn. Therefore,a bit stream which can be decoded by the moving picture decodingapparatus, among bit streams supplied from the coding end can bedetermined by the level identifier, thereby satisfactorily performingpicture prediction decoding corresponding to the picture predictioncoding on the coding end. Accordingly, a memory area in the decodingapparatus corresponding to the coding method in which there is norestraint on the capacity of the memory area can be designed.

In this eighth embodiment, the maximum number of reference pictureswhich are stored in the picture memory is decided in view of the numberof display wait pictures (Ndwp). Therefore, the picture memory in whichimage data of reference candidate pictures are stored can be efficientlyutilized depending on the status of processing for image data.

Here, in the eighth embodiment, the control of the picture memory isperformed so that image data of a picture which is not employed as areference picture are deleted from the picture memory immediately afterdisplay of the picture is finished. However, the image data of a picturethat is not employed as the reference picture may be deleted in timingother than immediately after the display as described in the eighthembodiment.

For example, the control of the picture memory in the eighth embodimentmay be performed so that image data of a picture that is stored in thepicture memory but is not employed as the reference picture are deletedfrom the picture memory after a display time of one picture expiresafter the picture has been displayed. In this case, the image data ofthe display wait picture are kept stored in the picture memory for apredetermined time period after the picture has been displayed.

Further, in the first to eighth embodiments, the moving picture codingapparatus or the moving picture decoding apparatus is implemented byhardware, while the moving picture coding apparatus or the movingpicture decoding apparatus may be implemented by software. In this case,by recording a program for executing the coding processing or thedecoding processing as described in any of the above embodiments, in adata storage medium such as a flexible disk, the moving picture codingapparatus or the moving picture decoding apparatus can be constructed inan independent computer system.

FIG. 19 are diagrams for explaining a system which implements the movingpicture coding apparatus according to any of the first to fourthembodiments or the moving picture decoding apparatus according to any ofthe fifth to eighth embodiments, with a computer system, by utilizing aflexible disk that contains the program.

FIG. 19(b) shows the front view of a flexible disk, the cross-sectionalview thereof, and a flexible disk body, and FIG. 19(a) shows an exampleof a physical format of the flexible disk as a storage medium body. Tobe specific, the flexible disk body FD is contained in the flexible diskcase F. On the surface of the flexible disk body, plural tracks Tr areconcentrically formed from the outer circumference toward the innercircumference. Each track Tr is divided into 16 sectors Se in theangular direction. Accordingly, in the flexible disk in which theabove-described program is stored, data of the program are recorded inthe sectors assigned onto the flexible disk body FD.

FIG. 19(c) shows a construction for recording or reproducing the programon/from the flexible disk FD. When the program is written in theflexible disk FD, data of the program supplied from a computer system Csare written in the flexible disk FD via a flexible disk drive. When themoving picture coding apparatus or the moving picture decoding apparatusis constructed in the computer system Cs using the program recorded onthe flexible disk, the program is read from the flexible disk by theflexible disk drive, and loaded onto the computer system.

While in the above description a flexible disk is employed as the datastorage medium, an optical disk may be employed as the data storagemedium. Also in this case, the moving picture coding apparatus or themoving picture decoding apparatus can be implemented by a computersystem. Further, the data storage medium is not restricted to theoptical disk and the flexible disk. Any medium, such as an IC card or aROM cassette, may be employed so long as the program can be stored inthe medium.

Hereinafter, applications of the moving picture coding apparatus or themoving picture decoding apparatus according to any of the aforementionedembodiments, and systems using the application will be describedhereinafter.

FIG. 20 is a block diagram illustrating an entire construction of acontents provision system 1100 that provides contents distributionservices.

A communication service providing area is divided into regions (cells)of desired size, and base stations 1107 to 1110 which are each fixedradio stations are established in the cells, respectively.

In this contents provision system 1100, various devices such as acomputer 1111, a PDA (personal digital assistant) 1112, a camera 1113, aportable phone 1114, and a portable phone with a camera 1200 areconnected, for example to the Internet 1101, through an Internet serviceprovider 1102, a telephone network 1104, and the base stations 1107 to1110.

The contents provision system 1100 is not restricted to a systemincluding all of the plural devices shown in FIG. 20, but may be oneincluding some of the plural devices shown in FIG. 20. Further, therespective devices may be connected directly to the telephone network1104, not through the base stations 1107 to 1110 as the fixed radiostations.

The camera 1113 is a device that can take moving pictures of an object,like a digital video camera. The portable phone may be a portable phoneset according to any of PDC (Personal Digital Communications) system,CDMA (Code Division Multiple Access) system, W-CDMA (Wideband-CodeDivision Multiple Access) system, and GSM (Global System for MobileCommunications) system, or PHS (Personal Handyphone System).

A streaming server 1103 is connected to the camera 1113 through the basestation 1109 and the telephone network 1104. In this system, livedistribution, based on coded data which are transmitted by the user,using the camera 1113 can be performed. The processing for coding dataof taken pictures may be carried out by either the camera 1113 or theserver that transmits the data. Moving picture data which are obtainedby taking moving pictures of an object by means of the camera 1116 maybe transmitted to the streaming server 1103 through the computer 1111.The camera 1116 is a device that can take still pictures or movingpictures of an object, such as a digital camera. In this case, coding ofthe moving picture data can be performed by either the camera 1116 orthe computer 1111. Further, the coding processing is carried out by anLSI 1117 included in the computer 1111 or the camera 1116.

Image coding or decoding software may be stored in a storage medium (aCD-ROM, a flexible disk, a hard disk, or the like), which is a recordingmedium containing data that is readable by the computer 1111 or thelike. Further, the moving picture data may be transmitted through theportable phone with a camera 1200. The moving picture data are datawhich have been coded by an LSI included in the portable phone 1200.

In this contents provision system 1100, contents whose pictures aretaken by the user with the camera 1113 or camera 1116 (for example, livevideo of a music concert) are coded in the same manner as any of theaforementioned embodiments, and transmitted from the camera to thestreaming server 1103. The contents data are subjected to streamingdistribution from the streaming server 1103 to a requesting client.

The client may be any of the computer 1111, the PDA 1112, the camera1113, the portable phone 1114 and the like, which can decode the codeddata.

In this contents provision system 1100, the coded data can be receivedand reproduced on the client side. When the data are received, decoded,and reproduced in real time on the client side, private broadcasting canbe realized.

The coding or decoding in the respective devices that constitute thissystem can be performed using the moving picture coding apparatus or themoving picture decoding apparatus according to any of the aforementionedembodiments.

A portable phone will be now described as an example.

FIG. 21 is a diagram illustrating a portable phone 1200 that utilizesthe moving picture coding apparatus and the moving picture decodingapparatus according to any of the aforementioned embodiments.

This portable phone 1200 includes an antenna 1201 fortransmitting/receiving radio waves to/from the base station 1110, acamera unit 1203 that can take video or still pictures of an object,such as a CCD camera, and a display unit 1202 such as a liquid crystaldisplay for displaying data of the video taken by the camera unit 1203or video received through the antenna 1201.

The portable phone 1200 further includes a main body 1204 includingplural control keys, a voice output unit 1208 for outputting voices suchas a speaker, a voice input unit 1205 for inputting voices such as amicrophone, a storage medium 1207 for retaining coded data or decodeddata such as data of taken moving pictures or still pictures, or data,moving picture data or still picture data of received e-mail, and a slotunit 1206 which enables the storage medium 1207 to be attached to theportable phone 1200.

The storage medium 1207 contains a flash memory element as a type ofEEPROM (Electrically Erasable and Programmable Read Only Memory) that isan electrically programmable and erasable non-volatile memory containedin a plastic case, like a SD card.

The portable phone 1200 will be described more specifically withreference to FIG. 22.

The portable phone 1200 has a main control unit 1241 that performsgeneral control for the respective units of the main body including thedisplay unit 1202 and the control key 1204.

The portable phone 1200 further includes a power supply circuit 1240, anoperation input control unit 1234, an image coding unit 1242, a camerainterface unit 1233, a LCD (Liquid Crystal Display) control unit 1232,an image decoding unit 1239, a multiplexing/demultiplexing unit 1238, arecording/reproduction unit 1237, a modulation/demodulation unit 1236,and an audio processing unit 1235. The respective units of the portablephone 1200 are connected to each other via a synchronization bus 1250.

The power supply circuit 1240 supplies power from a battery pack to therespective units when a call end/power supply key is turned ON under thecontrol of the user, thereby activating the digital portable phone witha camera 1200 to be turned into an operable state.

In the portable phone 1200, the respective units operate under controlof the main control unit 1241 that is constituted by a CPU, a ROM, a RAMand the like. To be more specific, in the portable phone 1200, an audiosignal that is obtained by voice inputting into the voice input unit1205 in a voice communication mode is converted into digital audio databy the audio processing unit 1235. The digital audio data are subjectedto a spectrum spread process by the modulation/demodulation circuit1236, further subjected to a D/A conversion process and a frequencytransformation process by the transmission/receiving circuit 1231, andtransmitted through the antenna 1201.

In this portable phone set 1200, a signal received through the antenna1201 in the voice communication mode is amplified, and then subjected toa frequency transformation process and an A/D conversion process. Thereceived signal is further subjected to a spectrum inverse spreadprocess in the modulation/demodulation circuit 1236, converted into ananalog audio signal by the audio processing unit 1235, and this analogaudio signal is outputted through the voice output unit 1208.

When the portable phone 1200 transmits electronic mail in a datacommunication mode, text data of the e-mail that is inputted bymanipulation of the control key 1204 on the main body are transmitted tothe main control unit 1241 via the operation input control unit 1234.The main control unit 1241 controls the respective units so that thetext data are subjected to the spectrum spread process in themodulation/demodulation circuit 1236, then subjected to the D/Aconversion process and the frequency transformation process in thetransmission/receiving circuit 1231, and thereafter transmitted to thebase station 1110 through the antenna 1201.

When this portable phone 1200 transmits image data in the datacommunication mode, data of a picture taken by the camera unit 1203 aresupplied to the image coding unit 1242 via the camera interface unit1233. When the portable phone 1200 does not transmit the image data, thedata of the picture taken by the camera unit 1203 can be displayeddirectly on the display unit 1202 via the camera interface unit 1233 andthe LCD control unit 1232.

The image coding unit 1242 includes the moving picture coding apparatusaccording to any of the aforementioned embodiments. This image codingunit 1242 compressively encodes the image data supplied from the cameraunit 1203 by the moving picture coding method according to any of theabove embodiments to convert the same into coded image data, and outputsthe obtained coded image data to the multiplexing/demultiplexing unit1238. At the same time, the portable phone 1200 transmits voices whichhave been inputted to the voice input unit 1205 while the picture hasbeen taken by the camera unit 1203, as digital audio data, to themultiplexing/demultiplexing unit 1238 through the audio processing unit1235.

The multiplexing/demultiplexing unit 1238 multiplexes the coded imagedata supplied from the image coding unit 1242 and the audio datasupplied from the audio processing unit 1235 by a predetermined method.Resultant multiplexed data are subjected to a spectrum spread process inthe modulation/demodulation circuit 1236, then further subjected to theDA conversion process and the frequency transformation process in thetransmission/receiving circuit 1231, and obtained data are transmittedthrough the antenna 1201.

When the portable phone 1200 receives data of a moving picture file thatis linked to a home page or the like in the data communication mode, asignal received from the base station 1110 through the antenna 1201 issubjected to a spectrum inverse spread process by themodulation/demodulation circuit 1236, and resultant multiplexed data aretransmitted to the multiplexing/demultiplexing unit 1238.

When the multiplexed data that have been received via the antenna 1201are decoded, the multiplexing/demultiplexing unit 1238 demultiplexes themultiplexed data to divide the data into a coded bit streamcorresponding to the image data and a coded bit stream corresponding tothe audio data, and the coded image data are supplied to the imagedecoding unit 1239 and the audio data are supplied to the audioprocessing unit 1235, via the synchronization bus 1250.

The image decoding unit 1239 includes the moving picture decodingapparatus according to any of the aforementioned embodiments. The imagedecoding unit 1239 decodes the coded bit stream of the image data by thedecoding method corresponding to the coding method according to any ofthe above-mentioned embodiments, to reproduce moving picture data, andsupplies the reproduced data to the display unit 1202 through the LCDcontrol unit 1232. Thereby, for example, the moving picture dataincluded in the moving picture file that is linked to the home page isdisplayed. At the same time, the audio processing unit 1235 converts theaudio data into an analog audio signal, and thereafter supplies theanalog audio signal to the voice output unit 1208. Thereby, for example,reproduction of the audio data included in the moving picture file thatis linked to the home page is performed.

The system to which the moving picture coding method and the movingpicture decoding method according to any of the aforementionedembodiments is applicable is not restricted to the above-mentionedcontents provision system.

Recently, digital broadcasting using satellites or terrestrial waves istalked frequently, and the moving picture coding apparatus and themoving picture decoding apparatus according to the above embodiments isapplicable also to a digital broadcasting system 1400 as shown in FIG.23.

More specifically, a coded bit stream corresponding to video informationis transmitted from a broadcast station 1409 to a satellite 1410 such asa communication satellite or a broadcast satellite, via radiocommunication. When the broadcast satellite 1410 receives the coded bitstream corresponding to the video information, the satellite 1410outputs broadcasting waves, and these waves are received by an antenna1406 at home that is provided with satellite broadcast receivingfacility. For example, an apparatus such as a television (receiver) 1401or a set top box (STB) 1407 decodes the coded bit stream, and reproducesthe video information.

Further, the moving picture decoding apparatus according to any of theaforementioned embodiments can be mounted also on a reproductionapparatus 1403 that can read and decode the coded bit stream recorded ona storage medium 1402 such as a CD or a DVD (recording medium).

In this case, reproduced video is displayed on a monitor 1404. Themoving picture decoding apparatus may be mounted on the set top box 1407that is connected to a cable 1405 for cable television or an antenna1406 for satellite/terrestrial broadcast, to reproduce the output of themoving picture decoding apparatus to be displayed on a monitor 1408 ofthe television. In this case, the moving picture decoding apparatus maybe incorporated not in the set top box but in the television. A vehicle1412 having an antenna 1411 can receive a signal from the satellite 1410or the base station 1107 (see FIG. 20), and reproduce a moving pictureto be displayed on a display device of a car navigation system 1413 orthe like which is mounted on the vehicle 1412.

Further, it is also possible that an image signal can be coded by themoving picture coding apparatus according to any of the aforementionedembodiments, and recorded in a recording medium.

A specific example of a recording device is a recorder 1420 such as aDVD recorder that records image signals on a DVD disk 1421, and a diskrecorder that records image signals on a hard disk. The image signalsmay be recorded on a SD card 1422. Further, when the recorder 1420includes the moving picture decoding apparatus according to any of theaforementioned embodiments, the image signals which are recorded on theDVD disk 1421 or the SD card 1422 can be reproduced by the recorder 1420and displayed on the monitor 1408.

Here, the structure of the car navigation system 1413 may include, forexample, the components of the portable phone shown in FIG. 22, otherthan the camera unit 1203, the camera interface unit 1233 and the imagecoding unit 1242. The same apply to the computer 1111 (see FIG. 20), orthe television (receiver) 1401.

Further, as the terminal such as the portable phone 1114 (see FIG. 20),one of three types of terminals: a transmission-receiving type terminalhaving both of an encoder and a decoder, a transmission terminal havingonly an encoder, and a receiving terminal having only a decoder, can bemounted.

As described above, the moving picture coding apparatus or the movingpicture decoding apparatus according to any of the aforementionedembodiments is applicable to any of the above-mentioned devices orsystems, whereby the effects as described in the above embodiments canbe obtained.

Further, it goes without saying that the embodiments and theirapplications of the present invention are not restricted to those shownin this description.

INDUSTRIAL AVAILABILITY

The moving picture coding method and the moving picture decoding methodaccording to the present invention can set the maximum number of intraframe pixels for a picture which can be coded or decoded, at an optimumvalue selected from plural values that have been set stepwise dependingon the coding level, in accordance with the specifications of theapparatus, whereby the memory area of the coding apparatus and thedecoding apparatus that are adapted to a coding method in which there isno restraint on the capacity of the memory area can be designed, whichis useful in designing the moving picture coding apparatus and themoving picture decoding apparatus.

1. A method for coding a moving picture which consists of a plurality ofpictures each consisting of a prescribed number of pixels, said methodcomprising: a level identifier output step of selecting a coding levelwhich indicates a height of the level of the coding processing for themoving picture and outputting a level identifier for identifying theselected coding level; a coded data generating step of coding the movingpicture according to the selected coding level, for each picture, togenerate coded data of the moving picture; and a coded sequencegenerating step of multiplexing the level identifier and the coded datato generate a code sequence; wherein the level identifier is anidentifier that identifies the maximum intra frame pixel number of apicture which conforms with the selected coding level, and the maximumstorage pixel number indicating amount of data that can be stored in apicture memory, which conforms with the selected coding level; saidcoded data generating step includes a predictive coding step ofpredictively coding a picture to be coded with reference to a picturewhich has been coded; and, the maximum number of reference candidatepictures which can be stored in the picture memory is calculated on thebasis of the vertical pixel number and the horizontal pixel number of apicture which is coded and the maximum storage pixel number which isidentified by the level identifier.
 2. A computer-readable storagemedium having a computer program stored thereon for causing a computerto execute a moving picture coding method comprising: a level identifieroutput step of selecting a coding level which indicates a height of thelevel of the coding processing for the moving picture and outputting alevel identifier for identifying the selected coding level; a coded datagenerating step of coding the moving picture according to the selectedcoding level, for each picture, to generate coded data of the movingpicture; and a coded sequence generating step of multiplexing the levelidentifier and the coded data to generate a code sequence; wherein thelevel identifier is an identifier that identifies the maximum intraframe pixel number of a picture which conforms with the selected codinglevel, and the maximum storage pixel number indicating amount of datathat can be stored in a picture memory, which conforms with the selectedcoding level; said coded data generating step includes a predictivecoding step of predictively coding a picture to be coded with referenceto a picture which has been coded; and, the maximum number of referencecandidate pictures which can be stored in the picture memory iscalculated on the basis of the vertical pixel number and the horizontalpixel number of a picture which is coded and the maximum storage pixelnumber which is identified by the level identifier.